External resource interoperability#

hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t *extSem_out, const hipExternalSemaphoreHandleDesc *semHandleDesc)#

Imports an external semaphore.

See also

Note

This API is currently not supported on Linux.

Parameters:
  • extSem_out[out] External semaphores to be waited on

  • semHandleDesc[in] Semaphore import handle descriptor

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreSignalParams *paramsArray, unsigned int numExtSems, hipStream_t stream)#

Signals a set of external semaphore objects.

See also

Note

This API is currently not supported on Linux.

Parameters:
  • extSemArray[in] External semaphores to be waited on

  • paramsArray[in] Array of semaphore parameters

  • numExtSems[in] Number of semaphores to wait on

  • stream[in] Stream to enqueue the wait operations in

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t *extSemArray, const hipExternalSemaphoreWaitParams *paramsArray, unsigned int numExtSems, hipStream_t stream)#

Waits on a set of external semaphore objects.

See also

Note

This API is currently not supported on Linux.

Parameters:
  • extSemArray[in] External semaphores to be waited on

  • paramsArray[in] Array of semaphore parameters

  • numExtSems[in] Number of semaphores to wait on

  • stream[in] Stream to enqueue the wait operations in

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

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.

See also

Note

This API is currently not supported on Linux.

Parameters:

extSem[in] handle to an external memory object

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipImportExternalMemory(hipExternalMemory_t *extMem_out, const hipExternalMemoryHandleDesc *memHandleDesc)#

Imports an external memory object.

See also

Parameters:
  • extMem_out[out] Returned handle to an external memory object

  • memHandleDesc[in] Memory import handle descriptor

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc)#

Maps a buffer onto an imported memory object.

See also

Parameters:
  • devPtr[out] Returned device pointer to buffer

  • extMem[in] Handle to external memory object

  • bufferDesc[in] Buffer descriptor

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem)#

Destroys an external memory object.

See also

Parameters:

extMem[in] External memory object to be destroyed

Returns:

hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

hipError_t hipExternalMemoryGetMappedMipmappedArray(hipMipmappedArray_t *mipmap, hipExternalMemory_t extMem, const hipExternalMemoryMipmappedArrayDesc *mipmapDesc)#

Maps a mipmapped array onto an external memory object.

Returned mipmapped array must be freed using hipFreeMipmappedArray.

Parameters:
  • mipmap[out] mipmapped array to return

  • extMem[in] external memory object handle

  • mipmapDesc[in] external mipmapped array descriptor

Returns:

hipSuccess, hipErrorInvalidValue, hipErrorInvalidResourceHandle