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 1111#include < detail/device_impl.hpp>
1212#include < detail/platform_info.hpp>
1313
14+ #include < algorithm>
1415#include < regex>
1516
1617__SYCL_INLINE_NAMESPACE (cl) {
@@ -239,10 +240,14 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
239240// Checking if we can allow device with device description DeviceDesc
240241bool deviceIsAllowed (const DeviceDescT &DeviceDesc,
241242 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." );
246251 auto EqualityComp = [&](const std::string &KeyName,
247252 const DeviceDescT &AllowListDeviceDesc) {
248253 // change to map::contains after switching DPC++ RT to C++20
You can’t perform that action at this time.
0 commit comments