diff --git a/samples/include/zello_log.h b/samples/include/zello_log.h index 0493ca7a..76cac0ed 100644 --- a/samples/include/zello_log.h +++ b/samples/include/zello_log.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2026 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -760,7 +760,7 @@ std::string to_string(const ze_image_format_layout_t layout) { } } -ze_image_format_layout_t to_layout(const std::string layout) { +ze_image_format_layout_t to_layout(const std::string &layout) { if (layout == "8") { return ZE_IMAGE_FORMAT_LAYOUT_8; } else if (layout == "16") { @@ -840,7 +840,7 @@ std::string to_string(const ze_image_format_type_t type) { } } -ze_image_format_type_t to_format_type(const std::string format_type) { +ze_image_format_type_t to_format_type(const std::string &format_type) { if (format_type == "UINT") { return ZE_IMAGE_FORMAT_TYPE_UINT; } else if (format_type == "SINT") { @@ -890,7 +890,7 @@ std::string to_string(const ze_image_flag_t flag) { return flags; } -ze_image_flag_t to_flag(const std::string flag) { +ze_image_flag_t to_flag(const std::string &flag) { // by default setting to READ ze_image_flag_t image_flags = {}; @@ -925,7 +925,7 @@ std::string to_string(const ze_image_type_t type) { } } -ze_image_type_t to_image_type(const std::string type) { +ze_image_type_t to_image_type(const std::string &type) { if (type == "1D") { return ZE_IMAGE_TYPE_1D; } else if (type == "2D") { diff --git a/scripts/templates/ze_loader_internal.h.mako b/scripts/templates/ze_loader_internal.h.mako index 12f71255..85d128ea 100644 --- a/scripts/templates/ze_loader_internal.h.mako +++ b/scripts/templates/ze_loader_internal.h.mako @@ -128,7 +128,7 @@ namespace loader std::vector compVersions; const char *LOADER_COMP_NAME = "loader"; - void debug_trace_message(std::string errorMessage, std::string errorValue); + void debug_trace_message(const std::string &errorMessage, const std::string &errorValue); ze_result_t init(); ze_result_t init_driver(driver_t &driver, ze_init_flags_t flags, ze_init_driver_type_desc_t* desc); void add_loader_version(); diff --git a/source/lib/ze_lib.h b/source/lib/ze_lib.h index 8c23167f..2cdc3e3d 100644 --- a/source/lib/ze_lib.h +++ b/source/lib/ze_lib.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2019-2025 Intel Corporation + * Copyright (C) 2019-2026 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -129,7 +129,7 @@ namespace ze_lib } ////////////////////////////////////////////////////////////////////////// - __zedlllocal void debug_trace_message(std::string message, std::string result) { + __zedlllocal void debug_trace_message(const std::string &message, const std::string &result) { if (debugTraceEnabled){ std::string debugTracePrefix = "ZE_LOADER_DEBUG_TRACE:"; std::cerr << debugTracePrefix << message << result << std::endl; diff --git a/source/loader/ze_loader.cpp b/source/loader/ze_loader.cpp index b18980cc..41adb841 100644 --- a/source/loader/ze_loader.cpp +++ b/source/loader/ze_loader.cpp @@ -25,7 +25,7 @@ namespace loader /////////////////////////////////////////////////////////////////////////////// context_t *context; - void context_t::debug_trace_message(std::string message, std::string result) { + void context_t::debug_trace_message(const std::string &message, const std::string &result) { if (debugTraceEnabled) { std::cerr << "ZE_LOADER_DEBUG_TRACE:" << message << result << std::endl; } diff --git a/source/loader/ze_loader_internal.h b/source/loader/ze_loader_internal.h index 9b8ce1ba..4cf1a1ba 100644 --- a/source/loader/ze_loader_internal.h +++ b/source/loader/ze_loader_internal.h @@ -169,7 +169,7 @@ namespace loader std::vector compVersions; const char *LOADER_COMP_NAME = "loader"; - void debug_trace_message(std::string errorMessage, std::string errorValue); + void debug_trace_message(const std::string &errorMessage, const std::string &errorValue); ze_result_t init(); ze_result_t init_driver(driver_t &driver, ze_init_flags_t flags, ze_init_driver_type_desc_t* desc); void add_loader_version();