Skip to content

Commit

Permalink
Pass EvBase by ref.
Browse files Browse the repository at this point in the history
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
  • Loading branch information
JackAKirk committed Sep 13, 2024
1 parent 10bc7b6 commit 332b461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/adapters/cuda/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/cuda/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; };

Expand Down

0 comments on commit 332b461

Please sign in to comment.