Skip to content

Commit

Permalink
Add check_devices_version() for distributed queue
Browse files Browse the repository at this point in the history
  • Loading branch information
jszuppe committed Aug 27, 2016
1 parent 5803d12 commit 95b7773
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/boost/compute/distributed/command_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ class command_queue
}
}

/// \internal_
/// Return true if every device supports at least OpenCL major.minor
bool check_devices_version(int major, int minor) const
{
bool check = true;
for(size_t i = 0; i < m_queues.size(); i++)
{
check = check && m_queues[i].get_device().check_version(major, minor);
}
return check;
}

private:
::boost::compute::distributed::context m_context;
std::vector< ::boost::compute::command_queue> m_queues;
Expand Down

0 comments on commit 95b7773

Please sign in to comment.