External Resource Interoperability#
External Resource Interoperability
Collaboration diagram for External Resource Interoperability:
Functions | |
hipError_t | hipImportExternalSemaphore (hipExternalSemaphore_t *extSem_out, const hipExternalSemaphoreHandleDesc *semHandleDesc) |
Imports an external semaphore. | |
hipError_t | hipSignalExternalSemaphoresAsync (const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreSignalParams *paramsArray, unsigned int numExtSems, hipStream_t stream) |
Signals a set of external semaphore objects. | |
hipError_t | hipWaitExternalSemaphoresAsync (const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreWaitParams *paramsArray, unsigned int numExtSems, hipStream_t stream) |
Waits on a set of external semaphore objects. | |
hipError_t | hipDestroyExternalSemaphore (hipExternalSemaphore_t extSem) |
Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed. | |
hipError_t | hipImportExternalMemory (hipExternalMemory_t *extMem_out, const hipExternalMemoryHandleDesc *memHandleDesc) |
Imports an external memory object. | |
hipError_t | hipExternalMemoryGetMappedBuffer (void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc) |
Maps a buffer onto an imported memory object. | |
hipError_t | hipDestroyExternalMemory (hipExternalMemory_t extMem) |
Destroys an external memory object. | |
hipError_t | hipExternalMemoryGetMappedMipmappedArray (hipMipmappedArray_t *mipmap, hipExternalMemory_t extMem, const hipExternalMemoryMipmappedArrayDesc *mipmapDesc) |
Maps a mipmapped array onto an external memory object. | |
Detailed Description
This section describes the external resource interoperability functions of HIP runtime API.
Function Documentation
◆ hipDestroyExternalMemory()
hipError_t hipDestroyExternalMemory | ( | hipExternalMemory_t | extMem | ) |
Destroys an external memory object.
- Parameters
-
[in] extMem External memory object to be destroyed
- See also
◆ hipDestroyExternalSemaphore()
hipError_t hipDestroyExternalSemaphore | ( | hipExternalSemaphore_t | extSem | ) |
Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.
- Parameters
-
[in] extSem handle to an external memory object
- See also
◆ hipExternalMemoryGetMappedBuffer()
hipError_t hipExternalMemoryGetMappedBuffer | ( | void ** | devPtr, |
hipExternalMemory_t | extMem, | ||
const hipExternalMemoryBufferDesc * | bufferDesc | ||
) |
Maps a buffer onto an imported memory object.
- Parameters
-
[out] devPtr Returned device pointer to buffer [in] extMem Handle to external memory object [in] bufferDesc Buffer descriptor
- See also
◆ hipExternalMemoryGetMappedMipmappedArray()
hipError_t hipExternalMemoryGetMappedMipmappedArray | ( | hipMipmappedArray_t * | mipmap, |
hipExternalMemory_t | extMem, | ||
const hipExternalMemoryMipmappedArrayDesc * | mipmapDesc | ||
) |
Maps a mipmapped array onto an external memory object.
- Parameters
-
[out] mipmap mipmapped array to return [in] extMem external memory object handle [in] mipmapDesc external mipmapped array descriptor
Returned mipmapped array must be freed using hipFreeMipmappedArray.
◆ hipImportExternalMemory()
hipError_t hipImportExternalMemory | ( | hipExternalMemory_t * | extMem_out, |
const hipExternalMemoryHandleDesc * | memHandleDesc | ||
) |
Imports an external memory object.
- Parameters
-
[out] extMem_out Returned handle to an external memory object [in] memHandleDesc Memory import handle descriptor
- See also
◆ hipImportExternalSemaphore()
hipError_t hipImportExternalSemaphore | ( | hipExternalSemaphore_t * | extSem_out, |
const hipExternalSemaphoreHandleDesc * | semHandleDesc | ||
) |
Imports an external semaphore.
- Parameters
-
[out] extSem_out External semaphores to be waited on [in] semHandleDesc Semaphore import handle descriptor
- See also
◆ hipSignalExternalSemaphoresAsync()
hipError_t hipSignalExternalSemaphoresAsync | ( | const hipExternalSemaphore_t * | extSemArray, |
const hipExternalSemaphoreSignalParams * | paramsArray, | ||
unsigned int | numExtSems, | ||
hipStream_t | stream | ||
) |
Signals a set of external semaphore objects.
- Parameters
-
[in] extSem_out External semaphores to be waited on [in] paramsArray Array of semaphore parameters [in] numExtSems Number of semaphores to wait on [in] stream Stream to enqueue the wait operations in
- See also
◆ hipWaitExternalSemaphoresAsync()
hipError_t hipWaitExternalSemaphoresAsync | ( | const hipExternalSemaphore_t * | extSemArray, |
const hipExternalSemaphoreWaitParams * | paramsArray, | ||
unsigned int | numExtSems, | ||
hipStream_t | stream | ||
) |
Waits on a set of external semaphore objects.
- Parameters
-
[in] extSem_out External semaphores to be waited on [in] paramsArray Array of semaphore parameters [in] numExtSems Number of semaphores to wait on [in] stream Stream to enqueue the wait operations in
- See also