DriverAPI

class DriverAPI

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
external fun ctxCreate(flags: Int, dev: Int): Long

Create a CUDA context. (cuCtxCreate)

Link copied to clipboard
external fun ctxDestroy(ctx: Long): Int

Destroy a CUDA context. (cuCtxDestroy)

Link copied to clipboard
external fun ctxDisablePeerAccess(peerContext: Long): Int

Disables direct access to memory allocations in a peer context and unregisters any registered allocations. (cuCtxDisablePeerAccess)

Link copied to clipboard
external fun ctxEnablePeerAccess(peerContext: Long, flags: Int): Int

Enables direct access to memory allocations in a peer context. (cuCtxEnablePeerAccess)

Link copied to clipboard
external fun ctxGetApiVersion(ctx: Long): Int

Gets the context's API version. (cuCtxGetApiVersion)

Link copied to clipboard
Link copied to clipboard
external fun ctxGetCurrent(): Long

Returns the CUDA context bound to the calling CPU thread. (cuCtxGetCurrent)

Link copied to clipboard
external fun ctxGetDevice(): Int

Returns the device ID for the current context. (cuCtxGetDevice)

Link copied to clipboard
external fun ctxGetFlags(): Int

Returns the flags for the current context. (cuCtxGetFlags)

Link copied to clipboard
external fun ctxGetId(ctx: Long): Long

Returns the unique Id associated with the context supplied. (cuCtxGetId)

Link copied to clipboard
fun ctxGetLimit(limit: Limit): Int
Link copied to clipboard
Link copied to clipboard

Returns numerical values that correspond to the least and greatest stream priorities. (cuCtxGetStreamPriorityRange)

Link copied to clipboard
external fun ctxPopCurrent(): Long

Pops the current CUDA context from the current CPU thread. (cuCtxPopCurrent)

Link copied to clipboard
external fun ctxPushCurrent(ctx: Long): Int

Pushes a context on the current CPU thread. (cuCtxPushCurrent)

Link copied to clipboard

Resets all persisting lines in cache to normal status.

Link copied to clipboard
Link copied to clipboard
external fun ctxSetCurrent(ctx: Long): Int

Binds the specified CUDA context to the calling CPU thread. (cuCtxSetCurrent)

Link copied to clipboard
fun ctxSetLimit(limit: Limit, value: Int): Int
Link copied to clipboard
Link copied to clipboard
external fun ctxSynchronize(): Int

Block for a context's tasks to complete. (cuCtxSynchronize)

Link copied to clipboard
external fun destroyArray(hArray: Long): Int

Destroys a CUDA array. (cuArrayDestroy)

Link copied to clipboard
external fun destroyExternalMemory(extMem: Long): Int

Destroys an external memory object. (cuDestroyExternalMemory)

Link copied to clipboard
external fun destroyExternalSemaphore(extSem: Long): Int

Destroys an external semaphore. (cuDestroyExternalSemaphore)

Link copied to clipboard
external fun devcieGetDefaultMemPool(dev: Int): Long

Returns the default mempool of a device. (cuDeviceGetDefaultMemPool)

Link copied to clipboard
external fun devcieGetMemPool(dev: Int): Long

Gets the current mempool for a device. (cuDeviceGetMemPool)

Link copied to clipboard
external fun deviceCanAccessPeer(dev: Int, peerDev: Int): Int

Queries if a device may directly access a peer device's memory. (cuDeviceCanAccessPeer)

Link copied to clipboard
external fun deviceGet(ordinal: Int): Int
Link copied to clipboard
external fun deviceGetByPCIBusId(): String

Returns a handle to a compute device. (cuDeviceGetByPCIBusId)

Link copied to clipboard
external fun deviceGetCount(): Int
Link copied to clipboard
external fun deviceGetName(len: Int, dev: Int): Int

Returns an identifier string for the device. (cuDeviceGetName)

Link copied to clipboard
external fun deviceGetPCIBusId(len: Int, dev: Int): String

Returns a PCI Bus Id string for the device. (cuDeviceGetPCIBusId)

Link copied to clipboard
external fun deviceGraphMemTrim(device: Int): Int

Free unused memory that was cached on the specified device for use with graphs back to the OS. (cuDeviceGraphMemTrim)

Link copied to clipboard
external fun devicePrimaryCtxGetState(dev: Int): Int

Get the state of the primary context. (cuDevicePrimaryCtxGetState)

Link copied to clipboard
external fun devicePrimaryCtxRelease(dev: Int): Int
Link copied to clipboard
external fun devicePrimaryCtxReset(dev: Int): Int
Link copied to clipboard
external fun devicePrimaryCtxRetain(dev: Int): Long

Retain the primary context on the GPU. (cuDevicePrimaryCtxRetain)

Link copied to clipboard
external fun devicePrimaryCtxSetFlags(dev: Int, flags: Int): Int
Link copied to clipboard
external fun driverGetVersion(): Int
Link copied to clipboard
external fun eventCreate(flags: Int): Long

Creates an event. (cuEventCreate)

Link copied to clipboard
external fun eventDestroy(hEvent: Long): Int

Destroys an event. (cuEventDestroy)

Link copied to clipboard
external fun eventElapsedTime(hStart: Long, hEnd: Long)

Computes the elapsed time between two events. (cuEventElapsedTime)

Link copied to clipboard
external fun eventQuery(hEvent: Long): Int

Queries an event's status (cuEventQuery)

Link copied to clipboard
external fun eventRecord(hEvent: Long, hStream: Long): Int

Records an event. (cuEventRecord)

Link copied to clipboard
external fun eventRecordWithFlags(hEvent: Long, hStream: Long, flags: Int): Int

Records an event. (cuEventRecordWithFlags)

Link copied to clipboard
external fun eventSynchronize(hEvent: Long): Int

Waits for an event to complete. (cuEventSynchronize)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external fun graphChildGraphNodeGetGraph(hNode: Long): Long

Gets a handle to the embedded graph of a child graph node. (cuGraphChildGraphNodeGetGraph)

Link copied to clipboard
external fun graphClone(originalGraph: Long): Long

Clones a graph. (cuGraphCreate)

Link copied to clipboard
external fun graphCreate(flags: Int): Long

Creates a graph. (cuGraphCreate)

Link copied to clipboard
external fun graphDestroy(hGraph: Long): Int

Destroys a graph. (cuGraphDestroy)

Link copied to clipboard
external fun graphDestroyNode(hNode: Long): Int

Remove a node from the graph. (cuGraphDestroyNode)

Link copied to clipboard
external fun graphEventRecordNodeGetEvent(hNode: Long): Long

Returns the event associated with an event record node. (cuGraphEventRecordNodeGetEvent)

Link copied to clipboard
external fun graphEventRecordNodeSetEvent(hNode: Long, event: Long): Int

Sets an event record node's event. (cuGraphEventRecordNodeSetEvent)

Link copied to clipboard
external fun graphEventWaitNodeGetEvent(hNode: Long): Long

Returns the event associated with an event wait node. (cuGraphEventWaitNodeGetEvent)

Link copied to clipboard
external fun graphEventWaitNodeSetEvent(hNode: Long, event: Long): Int

Sets an event wait node's event. (cuGraphEventWaitNodeSetEvent)

Link copied to clipboard
external fun graphExecChildGraphNodeSetParams(hGraphExec: Long, hNode: Long, childGraph: Long): Int

Updates node parameters in the child graph node in the given graphExec. (cuGraphExecChildGraphNodeSetParams)

Link copied to clipboard
external fun graphExecDestroy(hGraphExec: Long): Int

Destroys an executable graph. (cuGraphExecDestroy)

Link copied to clipboard
external fun graphExecEventRecordNodeSetEvent(hGraphExec: Long, hNode: Long, event: Long): Int

Sets the event for an event record node in the given graphExec. (cuGraphExecEventRecordNodeSetEvent)

Link copied to clipboard
external fun graphExecEventWaitNodeSetEvent(hGraphExec: Long, hNode: Long, event: Long): Int

Sets the event for an event wait node in the given graphExec. (cuGraphExecEventWaitNodeSetEvent)

Link copied to clipboard
external fun graphGetNodes(hGraph: Long): Int

Returns a graph's nodes. (cuGraphGetNodes)

Link copied to clipboard
external fun graphicsResourceSetMapFlags(resource: Long, flags: Int): Int

Set usage flags for mapping a graphics resource. (cuGraphicsResourceSetMapFlags)

Link copied to clipboard
external fun graphicsUnregisterResource(resource: Long): Int

Unregisters a graphics resource for access by CUDA. (cuGraphicsUnregisterResource)

Link copied to clipboard
external fun graphKernelNodeCopyAttributes(dst: Long, src: Long): Int

Copies attributes from source node to destination node. (cuGraphKernelNodeCopyAttributes)

Link copied to clipboard
external fun graphLaunch(hGraphExec: Long, hStream: Long): Int

Launches an executable graph in a stream. (cuGraphLaunch)

Link copied to clipboard
external fun graphMemFreeNodeGetParams(hNode: Long): Long

Returns a memory free node's parameters. (cuGraphMemFreeNodeGetParams)

Link copied to clipboard
external fun graphUpload(hGraphExec: Long, hStream: Long): Int

Uploads an executable graph in a stream. (cuGraphUpload)

Link copied to clipboard
external fun init(flags: Int): Int
Link copied to clipboard
external fun ipcCloseMemHandle(dptr: Long): Int

Attempts to close memory mapped with cuIpcOpenMemHandle. (cuIpcCloseMemHandle)

Link copied to clipboard
external fun kernelGetFunction(kernel: Long): Long

Returns a function handle. (cuKernelGetFunction)

Link copied to clipboard
external fun libraryGetModule(library: Long): Long

Returns a module handle. (cuLibraryGetModule)

Link copied to clipboard
external fun libraryUnload(library: Long): Int

Unloads a library. (cuLibraryUnload)

Link copied to clipboard
external fun linkDestroy(state: Long): Int

Destroys state for a JIT linker invocation. (cuLinkDestroy)

Link copied to clipboard
external fun memAddressFree(ptr: Long, size: Int): Int

Free an address range reservation. (cuMemAddressFree)

Link copied to clipboard
external fun memAlloc(byteSize: Int): Long

Allocates device memory. (cuMemAlloc)

Link copied to clipboard
external fun memAllocAsync(bytesize: Int, hStream: Long): Long

Allocates memory with stream ordered semantics. (cuMemAllocAsync)

Link copied to clipboard
external fun memAllocManaged(byteSize: Int, flags: Int): Long

Allocates memory that will be automatically managed by the Unified Memory system. (cuMemAllocManaged)

Link copied to clipboard
external fun memFree(dptr: Long): Int

Frees device memory. (cuMemFree)

Link copied to clipboard
external fun memFreeAsync(dptr: Long, hStream: Long): Int

Frees memory with stream ordered semantics. (cuMemFreeAsync)

Link copied to clipboard
external fun memFreeHost(p: Long): Int

Frees page-locked host memory. (cuMemFreeHost)

Link copied to clipboard
external fun memHostUnregister(p: Long): Int

Unregisters a memory range that was registered with cuMemHostRegister. (cuMemHostUnregister)

Link copied to clipboard
external fun memPoolDestroy(pool: Long): Int

Destroys the specified memory pool. (cuMemPoolDestroy)

Link copied to clipboard
external fun memPoolTrimTo(pool: Long, minBytesToKeep: Int): Int

Tries to release memory back to the OS. (cuMemPoolTrimTo)

Link copied to clipboard
external fun memRelease(handle: Long): Int

Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate. (cuMemRelease)

Link copied to clipboard
external fun memUnmap(ptr: Long, size: Int): Int

Unmap the backing memory of a given address range. (cuMemUnmap)

Link copied to clipboard
external fun moduleLoad(fname: String): Long

Loads a compute module. (cuModuleLoad)

Link copied to clipboard
external fun moduleUnload(hmod: Long): Int

Unloads a module. (cuModuleUnload)

Link copied to clipboard
external fun multicastAddDevice(mcHandle: Long, dev: Int)

Associate a device to a multicast object. (cuMulticastAddDevice)

Link copied to clipboard
external fun streamAttachMemAsync(hStream: Long, dptr: Long, length: Int, flags: Int): Int

Attach memory to a stream asynchronously. (cuStreamAttachMemAsync)

Link copied to clipboard
Link copied to clipboard
external fun streamCopyAttributes(dst: Long, src: Long): Int

Copies attributes from source stream to destination stream. (cuStreamCopyAttributes)

Link copied to clipboard
external fun streamCreate(flags: Int): Long

Create a stream. (cuStreamCreate)

Link copied to clipboard
external fun streamCreateWithPriority(flags: Int, priority: Int): Long

Create a stream with the given priority. (cuStreamCreateWithPriority)

Link copied to clipboard
external fun streamDestroy(hStream: Long): Int

Destroys a stream. (cuStreamDestroy)

Link copied to clipboard
external fun streamEndCapture(hStream: Long): Long

Ends capture on a stream, returning the captured graph. (cuStreamEndCapture)

Link copied to clipboard
external fun streamGetCtx(hStream: Long): Long

Query the context associated with a stream. (cuStreamGetCtx)

Link copied to clipboard
external fun streamGetFlags(hStream: Long): Int

Query the flags of a given stream. (cuStreamGetFlags)

Link copied to clipboard
external fun streamGetId(hStream: Long): Long

Returns the unique Id associated with the stream handle supplied. (cuStreamGetId)

Link copied to clipboard
external fun streamGetPriority(hStream: Long): Int

Query the priority of a given stream. (cuStreamGetPriority)

Link copied to clipboard
Link copied to clipboard
external fun streamQuery(hStream: Long): Int

Determine status of a compute stream. (cuStreamQuery)

Link copied to clipboard
external fun streamSynchronize(hStream: Long): Int

Wait until a stream's tasks are completed. (cuStreamSynchronize)

Link copied to clipboard
external fun streamWaitEvent(hStream: Long, hEvent: Long, flags: Int): Int

Make a compute stream wait on an event. (cuStreamWaitEvent)

Link copied to clipboard
external fun surfObjectDestroy(surfObject: Long): Int

Destroys a surface object. (cuSurfObjectDestroy)

Link copied to clipboard
external fun textObjectDestroy(textObject: Long): Int

Destroys a texture object. (cuTextObjectDestroy)

Link copied to clipboard
external fun userObjectRelease(cuObject: Long, count: UInt): Int

Release a reference to a user object. (cuUserObjectRelease)

Link copied to clipboard
external fun userObjectRetain(cuObject: Long, count: UInt): Int

Retain a reference to a user object. (cuUserObjectRetain)