Commit bd271b74 authored by Dominik Charousset's avatar Dominik Charousset

Fix shadowing warning

parent 108e51ff
...@@ -30,15 +30,15 @@ using namespace std; ...@@ -30,15 +30,15 @@ using namespace std;
namespace caf { namespace caf {
namespace opencl { namespace opencl {
const optional<const device&> manager::get_device(size_t id) const { const optional<const device&> manager::get_device(size_t dev_id) const {
if (platforms_.empty()) if (platforms_.empty())
return none; return none;
size_t to = 0; size_t to = 0;
for (auto& pl : platforms_) { for (auto& pl : platforms_) {
auto from = to; auto from = to;
to += pl.get_devices().size(); to += pl.get_devices().size();
if (id >= from && id < to) if (dev_id >= from && dev_id < to)
return pl.get_devices()[id - from]; return pl.get_devices()[dev_id - from];
} }
return none; return none;
} }
...@@ -53,8 +53,8 @@ void manager::init(actor_system_config&) { ...@@ -53,8 +53,8 @@ void manager::init(actor_system_config&) {
throw std::runtime_error("no OpenCL platform found"); throw std::runtime_error("no OpenCL platform found");
// initialize platforms (device discovery) // initialize platforms (device discovery)
unsigned current_device_id = 0; unsigned current_device_id = 0;
for (auto& id : platform_ids) { for (auto& pl_id : platform_ids) {
platforms_.push_back(platform::create(id, current_device_id)); platforms_.push_back(platform::create(pl_id, current_device_id));
current_device_id += current_device_id +=
static_cast<unsigned>(platforms_.back().get_devices().size()); static_cast<unsigned>(platforms_.back().get_devices().size());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment