Skip to content

Commit f43acb4

Browse files
committed
Apply CR comment
1 parent e26f8f7 commit f43acb4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sycl/source/detail/allowlist.cpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,14 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
239239
// Checking if we can allow device with device description DeviceDesc
240240
bool deviceIsAllowed(const DeviceDescT &DeviceDesc,
241241
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.");
248250
auto EqualityComp = [&](const std::string &KeyName,
249251
const DeviceDescT &AllowListDeviceDesc) {
250252
// change to map::contains after switching DPC++ RT to C++20

0 commit comments

Comments
 (0)