[llvm] [libsycl] Generic code cleanup (PR #224330)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:14:35 PDT 2026
================
@@ -27,55 +27,54 @@ platform device::get_platform() const {
backend device::get_backend() const noexcept { return impl->getBackend(); }
-std::vector<device> device::get_devices(info::device_type DeviceType) {
+std::vector<device> device::get_devices(info::device_type type) {
std::vector<device> Devices;
// Not calling platform::get_devices to avoid multiple vector packing
- for (auto &PlatformImpl : detail::PlatformImpl::getPlatforms()) {
- assert(PlatformImpl && "PlatformImpl can not be nullptr");
- PlatformImpl->iterateDevices(
- DeviceType, [&Devices](detail::DeviceImpl *DevImpl) {
- assert(DevImpl && "Device impl can't be nullptr");
- Devices.push_back(detail::createSyclObjFromImpl<device>(*DevImpl));
- });
+ for (const auto &Impl : detail::PlatformImpl::getPlatforms()) {
+ assert(Impl && "PlatformImpl can not be nullptr");
----------------
KseniyaTikhomirova wrote:
done
https://github.com/llvm/llvm-project/pull/224330
More information about the llvm-commits
mailing list