Skip to content
Closed
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
7 changes: 6 additions & 1 deletion sycl/source/detail/platform_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,13 @@ typename Param::return_type platform_impl::get_info() const {
}

// All devices on the platform must have the given aspect.
// False if there are no devices.
bool platform_impl::has(aspect Aspect) const {
for (const auto &dev : get_devices()) {
std::vector<device> devices = get_devices();
if (devices.size() == 0)
return false;

for (const auto &dev : devices) {
if (dev.has(Aspect) == false) {
return false;
}
Expand Down