File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -239,12 +239,14 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
239
239
// Checking if we can allow device with device description DeviceDesc
240
240
bool deviceIsAllowed (const DeviceDescT &DeviceDesc,
241
241
const AllowListParsedT &AllowListParsed) {
242
- for (const auto &SupportedKeyName : SupportedAllowListKeyNames) {
243
- (void )SupportedKeyName;
244
- assert ((DeviceDesc.find (SupportedKeyName) != DeviceDesc.end ()) &&
245
- " DeviceDesc map should have all supported keys for "
246
- " SYCL_DEVICE_ALLOWLIST." );
247
- }
242
+ assert (std::all_of (SupportedAllowListKeyNames.begin (),
243
+ SupportedAllowListKeyNames.end (),
244
+ [&DeviceDesc](const auto &SupportedKeyName) {
245
+ return DeviceDesc.find (SupportedKeyName) !=
246
+ DeviceDesc.end ();
247
+ }) &&
248
+ " DeviceDesc map should have all supported keys for "
249
+ " SYCL_DEVICE_ALLOWLIST." );
248
250
auto EqualityComp = [&](const std::string &KeyName,
249
251
const DeviceDescT &AllowListDeviceDesc) {
250
252
// change to map::contains after switching DPC++ RT to C++20
You can’t perform that action at this time.
0 commit comments