Skip to content

Commit 95b7773

Browse files
committed
Add check_devices_version() for distributed queue
1 parent 5803d12 commit 95b7773

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/boost/compute/distributed/command_queue.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,18 @@ class command_queue
231231
}
232232
}
233233

234+
/// \internal_
235+
/// Return true if every device supports at least OpenCL major.minor
236+
bool check_devices_version(int major, int minor) const
237+
{
238+
bool check = true;
239+
for(size_t i = 0; i < m_queues.size(); i++)
240+
{
241+
check = check && m_queues[i].get_device().check_version(major, minor);
242+
}
243+
return check;
244+
}
245+
234246
private:
235247
::boost::compute::distributed::context m_context;
236248
std::vector< ::boost::compute::command_queue> m_queues;

0 commit comments

Comments
 (0)