@@ -462,7 +462,7 @@ pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms,
462
462
}
463
463
464
464
static std::vector<pi_platform> PiPlatformsCache;
465
- static std::mutex PlatformsCacheMutex ;
465
+ static std::mutex PiPlatformsCacheMutex ;
466
466
467
467
// This is a good time to initialize Level Zero.
468
468
// TODO: We can still safely recover if something goes wrong during the init.
@@ -498,7 +498,7 @@ pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms,
498
498
assert (ZeDriverCount == 1 );
499
499
ZE_CALL (zeDriverGet (&ZeDriverCount, &ZeDriver));
500
500
501
- std::lock_guard<std::mutex> Lock (PlatformsCacheMutex );
501
+ std::lock_guard<std::mutex> Lock (PiPlatformsCacheMutex );
502
502
for (const pi_platform CachedPlatform : PiPlatformsCache) {
503
503
if (CachedPlatform->ZeDriver == ZeDriver) {
504
504
Platforms[0 ] = CachedPlatform;
@@ -631,7 +631,7 @@ pi_result piDevicesGet(pi_platform Platform, pi_device_type DeviceType,
631
631
632
632
// Get number of devices supporting Level Zero
633
633
uint32_t ZeDeviceCount = 0 ;
634
- std::lock_guard<std::mutex> Lock (Platform->DeviceCacheMutex );
634
+ std::lock_guard<std::mutex> Lock (Platform->PiDevicesCacheMutex );
635
635
if (Platform->CacheInvalidated ) {
636
636
for (const pi_device CachedDevice : Platform->PiDevicesCache ) {
637
637
CachedDevice->initialize ();
@@ -709,7 +709,7 @@ pi_result piDeviceRelease(pi_device Device) {
709
709
// but when would we free the device's data?
710
710
if (--(Device->RefCount ) == 0 ) {
711
711
pi_platform Platform = Device->Platform ;
712
- std::lock_guard<std::mutex> Lock (Platform->DeviceCacheMutex );
712
+ std::lock_guard<std::mutex> Lock (Platform->PiDevicesCacheMutex );
713
713
Platform->CacheInvalidated = true ;
714
714
}
715
715
0 commit comments