Skip to content

Commit

Permalink
Fix passing struct object by value
Browse files Browse the repository at this point in the history
Don't pass large objects by value, use a reference instead. Also make
function defined in header `inline`.
  • Loading branch information
kbenzie committed Jan 23, 2025
1 parent b841691 commit 65eff21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/adapters/level_zero/ze_tracer_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#include <memory>

std::shared_ptr<_zel_tracer_handle_t>
enableTracing(zel_core_callbacks_t prologueCallbacks,
zel_core_callbacks_t epilogueCallbacks) {
inline std::shared_ptr<_zel_tracer_handle_t>
enableTracing(zel_core_callbacks_t &prologueCallbacks,
zel_core_callbacks_t &epilogueCallbacks) {
EXPECT_EQ(zeInit(ZE_INIT_FLAG_GPU_ONLY), ZE_RESULT_SUCCESS);

zel_tracer_desc_t tracer_desc = {ZEL_STRUCTURE_TYPE_TRACER_EXP_DESC, nullptr,
Expand Down

0 comments on commit 65eff21

Please sign in to comment.