SWDEV-509788 - Code cleanups in Event class

Change-Id: I4163ce6c1dabeaab92de13b51b6a46b7be83e2bd


[ROCm/clr commit: e9b33af45a]
Tá an tiomantas seo le fáil i:
Ioannis Assiouras
2025-02-25 02:20:45 +00:00
tuismitheoir 004fc8f4a7
tiomantas efd1f3f012
D'athraigh 4 comhad le 19 breiseanna agus 20 scriosta
+5 -1
Féach ar an gComhad
@@ -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);