We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9dba48 commit ee516a4Copy full SHA for ee516a4
src/provider/provider_level_zero.c
@@ -1045,10 +1045,12 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
1045
1046
uint32_t existing_peer_index = 0;
1047
utils_write_lock(&ze_provider->resident_device_rwlock);
1048
- while (existing_peer_index < ze_provider->resident_device_count &&
1049
- ze_provider->resident_device_handles[existing_peer_index] !=
1050
- device) {
1051
- ++existing_peer_index;
+ for (; existing_peer_index < ze_provider->resident_device_count;
+ ++existing_peer_index) {
+ if (ze_provider->resident_device_handles[existing_peer_index] !=
+ device) {
1052
+ break;
1053
+ }
1054
}
1055
1056
if (ze_provider->resident_device_count == 0 ||
0 commit comments