Function rcudnn::cudaDeviceGetNvSciSyncAttributes[][src]

pub unsafe extern "C" fn cudaDeviceGetNvSciSyncAttributes(
    nvSciSyncAttrList: *mut c_void,
    device: i32,
    flags: i32
) -> cudaError
Expand description

\brief Return NvSciSync attributes that this device can support.

Returns in \p nvSciSyncAttrList, the properties of NvSciSync that this CUDA device, \p dev can support. The returned \p nvSciSyncAttrList can be used to create an NvSciSync that matches this device’s capabilities.

If NvSciSyncAttrKey_RequiredPerm field in \p nvSciSyncAttrList is already set this API will return ::cudaErrorInvalidValue.

The applications should set \p nvSciSyncAttrList to a valid NvSciSyncAttrList failing which this API will return ::cudaErrorInvalidHandle.

The \p flags controls how applications intends to use the NvSciSync created from the \p nvSciSyncAttrList. The valid flags are:

  • ::cudaNvSciSyncAttrSignal, specifies that the applications intends to signal an NvSciSync on this CUDA device.
  • ::cudaNvSciSyncAttrWait, specifies that the applications intends to wait on an NvSciSync on this CUDA device.

At least one of these flags must be set, failing which the API returns ::cudaErrorInvalidValue. Both the flags are orthogonal to one another: a developer may set both these flags that allows to set both wait and signal specific attributes in the same \p nvSciSyncAttrList.

\param nvSciSyncAttrList - Return NvSciSync attributes supported. \param device - Valid Cuda Device to get NvSciSync attributes for. \param flags - flags describing NvSciSync usage.

\return

::cudaSuccess, ::cudaErrorDeviceUninitialized, ::cudaErrorInvalidValue, ::cudaErrorInvalidHandle, ::cudaErrorInvalidDevice, ::cudaErrorNotSupported, ::cudaErrorMemoryAllocation

\sa ::cudaImportExternalSemaphore, ::cudaDestroyExternalSemaphore, ::cudaSignalExternalSemaphoresAsync, ::cudaWaitExternalSemaphoresAsync