Skip to content

Commit 201c3c2

Browse files
[SYCL][NFC] avoid redundant copies of platform/device vector (#2737)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent d81081f commit 201c3c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/tools/sycl-ls/sycl-ls.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int main(int argc, char **argv) {
106106
return EXIT_FAILURE;
107107
}
108108

109-
auto Platforms = platform::get_platforms();
109+
const auto &Platforms = platform::get_platforms();
110110
if (verbose)
111111
std::cout << "Platforms: " << Platforms.size() << std::endl;
112112

@@ -122,7 +122,7 @@ int main(int argc, char **argv) {
122122
std::cout << " Name : " << PlatformName << std::endl;
123123
std::cout << " Vendor : " << PlatformVendor << std::endl;
124124
}
125-
auto Devices = Platform.get_devices();
125+
const auto &Devices = Platform.get_devices();
126126
if (verbose)
127127
std::cout << " Devices : " << Devices.size() << std::endl;
128128
uint32_t DeviceNum = 0;

0 commit comments

Comments
 (0)