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