Ensure that test_preprocessors checks __OPENCL_C_VERSION__ correctly for CL 3.0 contexts. (#938)

This commit is contained in:
David Avedissian
2020-09-17 09:42:58 +01:00
committed by GitHub
parent f627a68dd6
commit 3db1a9b3aa
3 changed files with 126 additions and 90 deletions

View File

@@ -175,14 +175,21 @@ cl_device_fp_config get_default_rounding_mode( cl_device_id device );
/* Prints out the standard device header for all tests given the device to print for */
extern int printDeviceHeader( cl_device_id device );
// Execute the CL_DEVICE_OPENCL_C_VERSION query and return the OpenCL C version
// is supported by the device.
Version get_device_cl_c_version(cl_device_id device);
// Gets the latest (potentially non-backward compatible) OpenCL C version
// supported by the device.
Version get_device_cl_c_version(cl_device_id device);
Version get_device_latest_cl_c_version(cl_device_id device);
// Gets the maximum universally supported OpenCL C version in a context, i.e.
// the OpenCL C version supported by all devices in a context.
Version get_max_OpenCL_C_for_context(cl_context context);
// Checks whether a particular OpenCL C version is supported by the device.
bool device_supports_cl_c_version(cl_device_id device, Version version);
// Poll fn every interval_ms until timeout_ms or it returns true
bool poll_until(unsigned timeout_ms, unsigned interval_ms,
std::function<bool()> fn);