Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions sycl/source/detail/allowlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <detail/device_impl.hpp>
#include <detail/platform_info.hpp>

#include <algorithm>
#include <regex>

__SYCL_INLINE_NAMESPACE(cl) {
Expand Down Expand Up @@ -239,10 +240,14 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
// Checking if we can allow device with device description DeviceDesc
bool deviceIsAllowed(const DeviceDescT &DeviceDesc,
const AllowListParsedT &AllowListParsed) {
for (const auto &SupportedKeyName : SupportedAllowListKeyNames)
assert((DeviceDesc.find(SupportedKeyName) != DeviceDesc.end()) &&
"DeviceDesc map should have all supported keys for "
"SYCL_DEVICE_ALLOWLIST.");
assert(std::all_of(SupportedAllowListKeyNames.begin(),
SupportedAllowListKeyNames.end(),
[&DeviceDesc](const auto &SupportedKeyName) {
return DeviceDesc.find(SupportedKeyName) !=
DeviceDesc.end();
}) &&
"DeviceDesc map should have all supported keys for "
"SYCL_DEVICE_ALLOWLIST.");
auto EqualityComp = [&](const std::string &KeyName,
const DeviceDescT &AllowListDeviceDesc) {
// change to map::contains after switching DPC++ RT to C++20
Expand Down