We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77fe5e8 commit c736d6eCopy full SHA for c736d6e
include/boost/compute/platform.hpp
@@ -211,6 +211,23 @@ class platform
211
return m_platform != other.m_platform;
212
}
213
214
+ /// Returns \c true if the platform OpenCL version is major.minor
215
+ /// or newer; otherwise returns \c false.
216
+ bool check_version(int major, int minor) const
217
+ {
218
+ std::stringstream stream;
219
+ stream << version();
220
+
221
+ int actual_major, actual_minor;
222
+ stream.ignore(7); // 'OpenCL '
223
+ stream >> actual_major;
224
+ stream.ignore(1); // '.'
225
+ stream >> actual_minor;
226
227
+ return actual_major > major ||
228
+ (actual_major == major && actual_minor >= minor);
229
+ }
230
231
private:
232
cl_platform_id m_platform;
233
};
0 commit comments