Skip to content

Commit

Permalink
Use std::move to prevent extra string copy
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Oct 3, 2023
1 parent 2469193 commit 296533e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions onnxruntime/core/providers/qnn/builder/qnn_backend_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Licensed under the MIT License.

#pragma once
#include <utility>

#ifdef _WIN32
#include <windows.h>
#include <psapi.h>
Expand Down Expand Up @@ -30,11 +32,11 @@ class QnnBackendManager {
uint32_t rpc_control_latency,
HtpPerformanceMode htp_performance_mode,
std::string qnn_saver_path = "")
: backend_path_(backend_path),
: backend_path_(std::move(backend_path)),
profiling_level_(profiling_level),
rpc_control_latency_(rpc_control_latency),
htp_performance_mode_(htp_performance_mode),
qnn_saver_path_(qnn_saver_path) {
qnn_saver_path_(std::move(qnn_saver_path)) {
}
ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(QnnBackendManager);

Expand Down

0 comments on commit 296533e

Please sign in to comment.