Skip to content

Commit 71a1602

Browse files
committed
Revert unrelated change
1 parent 0047ee5 commit 71a1602

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

sycl/source/detail/platform_impl.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,23 +172,21 @@ std::vector<platform> platform_impl::get_platforms() {
172172
std::vector<std::pair<platform, AdapterPtr>> PlatformsWithAdapter;
173173

174174
// Then check backend-specific adapters
175-
std::vector<platform> Platforms;
176175
for (auto &Adapter : Adapters) {
177176
const auto &AdapterPlatforms = getAdapterPlatforms(Adapter);
178177
for (const auto &P : AdapterPlatforms) {
179-
Platforms.push_back(P);
180178
PlatformsWithAdapter.push_back({P, Adapter});
181179
}
182180
}
183181

184182
// For the selected platforms register them with their adapters
185-
// std::vector<platform> Platforms;
186-
// for (auto &Platform : PlatformsWithAdapter) {
187-
// auto &Adapter = Platform.second;
188-
// std::lock_guard<std::mutex> Guard(*Adapter->getAdapterMutex());
189-
// Adapter->getPlatformId(getSyclObjImpl(Platform.first)->getHandleRef());
190-
// Platforms.push_back(Platform.first);
191-
// }
183+
std::vector<platform> Platforms;
184+
for (auto &Platform : PlatformsWithAdapter) {
185+
auto &Adapter = Platform.second;
186+
std::lock_guard<std::mutex> Guard(*Adapter->getAdapterMutex());
187+
Adapter->getPlatformId(getSyclObjImpl(Platform.first)->getHandleRef());
188+
Platforms.push_back(Platform.first);
189+
}
192190

193191
// This initializes a function-local variable whose destructor is invoked as
194192
// the SYCL shared library is first being unloaded.

0 commit comments

Comments
 (0)