Skip to content

Commit 317387f

Browse files
committed
clang-format
Signed-off-by: Byoungro So <[email protected]>
1 parent eadb848 commit 317387f

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

sycl/source/detail/global_handler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ ProgramManager &GlobalHandler::getProgramManager() {
5252

5353
Sync &GlobalHandler::getSync() { return getOrCreate(MSync); }
5454

55-
std::map<PlatformImplPtr, std::vector<DeviceImplPtr>> &GlobalHandler::getPlatformDeviceCache() {
55+
std::map<PlatformImplPtr, std::vector<DeviceImplPtr>> &
56+
GlobalHandler::getPlatformDeviceCache() {
5657
return getOrCreate(MPlatformDeviceCache);
5758
}
5859

sycl/source/detail/global_handler.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <CL/sycl/detail/spinlock.hpp>
1212
#include <CL/sycl/detail/util.hpp>
1313

14-
#include <memory>
1514
#include <map>
15+
#include <memory>
1616

1717
__SYCL_INLINE_NAMESPACE(cl) {
1818
namespace sycl {
@@ -54,7 +54,8 @@ class GlobalHandler {
5454
Scheduler &getScheduler();
5555
ProgramManager &getProgramManager();
5656
Sync &getSync();
57-
std::map<PlatformImplPtr, std::vector<DeviceImplPtr>> &getPlatformDeviceCache();
57+
std::map<PlatformImplPtr, std::vector<DeviceImplPtr>> &
58+
getPlatformDeviceCache();
5859
std::mutex &getPlatformMapMutex();
5960
std::mutex &getFilterMutex();
6061
std::vector<plugin> &getPlugins();
@@ -80,7 +81,8 @@ class GlobalHandler {
8081
InstWithLock<Scheduler> MScheduler;
8182
InstWithLock<ProgramManager> MProgramManager;
8283
InstWithLock<Sync> MSync;
83-
InstWithLock<std::map<PlatformImplPtr, std::vector<DeviceImplPtr>>> MPlatformDeviceCache;
84+
InstWithLock<std::map<PlatformImplPtr, std::vector<DeviceImplPtr>>>
85+
MPlatformDeviceCache;
8486
InstWithLock<std::mutex> MPlatformMapMutex;
8587
InstWithLock<std::mutex> MFilterMutex;
8688
InstWithLock<std::vector<plugin>> MPlugins;

sycl/source/detail/pi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ void fillPlatformAndDeviceCache(plugin &Plugin) {
608608
PlatformImpl->getOrMakeDeviceImpl(PiDevice, PlatformImpl);
609609
DeviceCache.emplace_back(Device);
610610
}
611-
611+
612612
PlatformDeviceCache[PlatformImpl] = DeviceCache;
613613
}
614614
DeviceNum += UnfilteredDeviceCount;

sycl/source/detail/platform_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ DeviceImplPtr platform_impl::getOrMakeDeviceImpl(
8787
GlobalHandler::instance().getPlatformDeviceCache();
8888

8989
// If we've already seen this device, return the impl
90-
std::vector<DeviceImplPtr>& DeviceCache = PlatformDeviceCache[PlatformImpl];
90+
std::vector<DeviceImplPtr> &DeviceCache = PlatformDeviceCache[PlatformImpl];
9191
for (const DeviceImplPtr &Device : DeviceCache) {
9292
if (Device->getHandleRef() == PiDevice)
9393
return Device;
@@ -115,7 +115,7 @@ platform_impl::get_devices(info::device_type DeviceType) const {
115115
Platform = Pair.first;
116116
}
117117
}
118-
std::vector<DeviceImplPtr>& DeviceCache = PlatformDeviceCache[Platform];
118+
std::vector<DeviceImplPtr> &DeviceCache = PlatformDeviceCache[Platform];
119119
for (const DeviceImplPtr &Device : DeviceCache) {
120120
// Assumption here is that there is 1-to-1 mapping between PiDevType and
121121
// Sycl device type for GPU, CPU, and ACC.

0 commit comments

Comments
 (0)