Skip to content

Commit f5bc09a

Browse files
authored
[SYCL] fix the static verifier reported issues (#11713)
Changed auto to auto& in for loops for performance improvement.
1 parent 1d62f4c commit f5bc09a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/source/detail/device_image_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ class device_image_impl {
195195
// new value while another thread is reading the value to pass it to
196196
// JIT compiler.
197197
const std::lock_guard<std::mutex> SpecConstLock(MSpecConstAccessMtx);
198-
for (auto SpecConst : MSpecConstSymMap) {
199-
for (auto Desc : SpecConst.second) {
198+
for (auto &SpecConst : MSpecConstSymMap) {
199+
for (auto &Desc : SpecConst.second) {
200200
if (Desc.IsSet)
201201
return true;
202202
}

0 commit comments

Comments
 (0)