mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
5e36b1fcbf
commit
90597995d2
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user