Dynamic selection of device type

I’ve thought a little about your situation, and tried to come up with a different approach. If you are using every device on the system, I imagine it is easier to enumerate them and create a queue from each directly, which are then used in this lower layer.

auto platforms = sycl::platform::get_platforms();
std::vector<sycl::queue> queues;
for (auto plat : platforms) {
  for (auto dev : plat.get_devices()) {
    queues.push_back(sycl::queue{dev});
  }
}

This will give you a vector of queues which you can distribute among these lower layers.

Otherwise, the selector example I linked in a previous reply will show you how to encapsulate the logic of which device to choose inside a single class that you can use in your lower layers.