From 332b4619ef90b2d804c0f7b93852bc484dbe79d8 Mon Sep 17 00:00:00 2001 From: JackAKirk Date: Fri, 13 Sep 2024 03:24:04 -0700 Subject: [PATCH] Pass EvBase by ref. Signed-off-by: JackAKirk --- source/adapters/cuda/context.hpp | 2 +- source/adapters/cuda/device.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/adapters/cuda/context.hpp b/source/adapters/cuda/context.hpp index 53925f98b2..f2bb1580ba 100644 --- a/source/adapters/cuda/context.hpp +++ b/source/adapters/cuda/context.hpp @@ -117,7 +117,7 @@ struct ur_context_handle_t_ { ur_context_handle_t_(const ur_device_handle_t *Devs, uint32_t NumDevices) : Devices{Devs, Devs + NumDevices}, RefCount{1} { - CUevent EvBase; + CUevent EvBase = nullptr; int i = 0; for (auto &Dev : Devices) { urDeviceRetain(Dev); diff --git a/source/adapters/cuda/device.hpp b/source/adapters/cuda/device.hpp index 8c88d5ee9d..40ababf507 100644 --- a/source/adapters/cuda/device.hpp +++ b/source/adapters/cuda/device.hpp @@ -82,7 +82,7 @@ struct ur_device_handle_t_ { UR_CHECK_ERROR(cuDevicePrimaryCtxRetain(&CuContext, CuDevice)); }; - void setBaseEvent(CUevent event) { EvBase = event; }; + void setBaseEvent(const CUevent &event) { EvBase = event; }; native_type get() const noexcept { return CuDevice; };