Do not copy ze_ipc_event_pool_handle_t in internal functions of NEO

The size of this type is at least 64 bytes due to
ZE_MAX_IPC_HANDLE_SIZE. This change introduces usage
of const reference instead of copying.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-10-17 12:34:30 +00:00
committed by Compute-Runtime-Automation
parent 5e36b1fcbf
commit 90597995d2
4 changed files with 4 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ struct Context : _ze_context_handle_t {
size_t size,
ze_memory_access_attribute_t *access,
size_t *outSize) = 0;
virtual ze_result_t openEventPoolIpcHandle(ze_ipc_event_pool_handle_t hIpc,
virtual ze_result_t openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &hIpc,
ze_event_pool_handle_t *phEventPool) = 0;
virtual ze_result_t createEventPool(const ze_event_pool_desc_t *desc,
uint32_t numDevices,

View File

@@ -556,7 +556,7 @@ ze_result_t EventPoolImp::getIpcHandle(ze_ipc_event_pool_handle_t *pIpcHandle) {
return ZE_RESULT_SUCCESS;
}
ze_result_t ContextImp::openEventPoolIpcHandle(ze_ipc_event_pool_handle_t hIpc,
ze_result_t ContextImp::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &hIpc,
ze_event_pool_handle_t *phEventPool) {
uint64_t handle = 0u;
memcpy_s(&handle, sizeof(int), hIpc.data, sizeof(int));

View File

@@ -126,7 +126,7 @@ struct ContextImp : Context {
size_t size,
ze_memory_access_attribute_t *access,
size_t *outSize) override;
ze_result_t openEventPoolIpcHandle(ze_ipc_event_pool_handle_t hIpc,
ze_result_t openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &hIpc,
ze_event_pool_handle_t *phEventPool) override;
ze_result_t createEventPool(const ze_event_pool_desc_t *desc,
uint32_t numDevices,