SWDEV-509788 - Code cleanups in Event class
Change-Id: I4163ce6c1dabeaab92de13b51b6a46b7be83e2bd
[ROCm/clr commit: e9b33af45a]
Tá an tiomantas seo le fáil i:
@@ -75,6 +75,7 @@ bool IPCEvent::createIpcEventShmemIfNeeded() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t IPCEvent::query() {
|
||||
if (ipc_evt_.ipc_shmem_) {
|
||||
int prev_read_idx = ipc_evt_.ipc_shmem_->read_index;
|
||||
@@ -87,6 +88,7 @@ hipError_t IPCEvent::query() {
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t IPCEvent::synchronize() {
|
||||
if (ipc_evt_.ipc_shmem_) {
|
||||
int prev_read_idx = ipc_evt_.ipc_shmem_->read_index;
|
||||
@@ -101,6 +103,7 @@ hipError_t IPCEvent::synchronize() {
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t IPCEvent::streamWait(hipStream_t stream, uint flags) {
|
||||
|
||||
int offset = ipc_evt_.ipc_shmem_->read_index;
|
||||
@@ -152,6 +155,7 @@ hipError_t IPCEvent::enqueueRecordCommand(hipStream_t stream, amd::Command* comm
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t IPCEvent::GetHandle(ihipIpcEventHandle_t* handle) {
|
||||
if (!createIpcEventShmemIfNeeded()) {
|
||||
return hipErrorInvalidValue;
|
||||
@@ -163,6 +167,7 @@ hipError_t IPCEvent::GetHandle(ihipIpcEventHandle_t* handle) {
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t IPCEvent::OpenHandle(ihipIpcEventHandle_t* handle) {
|
||||
ipc_evt_.ipc_name_ = handle->shmem_name;
|
||||
if (!amd::Os::MemoryMapFileTruncated(ipc_evt_.ipc_name_.c_str(),
|
||||
@@ -186,7 +191,6 @@ hipError_t IPCEvent::OpenHandle(ihipIpcEventHandle_t* handle) {
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
||||
hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event) {
|
||||
HIP_INIT_API(hipIpcGetEventHandle, handle, event);
|
||||
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir