Accept OpenCL 3.0 in version parsing code and use where appropriate (#752)

* Accept OpenCL 3.0 in version parsing code and use where appropriate

There were a number of tests against 2.2 that are clearer against 3.0.

Fixes #751

Signed-off-by: Kévin Petit <kpet@free.fr>

* Remove CL_EXPERIMENTAL guards

Signed-off-by: Kévin Petit <kpet@free.fr>

* formatting

* Configure the headers for OpenCL 3.0

* more format fixes
This commit is contained in:
Kévin Petit
2020-04-30 11:51:06 +01:00
committed by GitHub
parent 1e5ffa08b5
commit 5e2f5b857e
10 changed files with 43 additions and 33 deletions

View File

@@ -885,6 +885,8 @@ Version get_device_cl_version(cl_device_id device)
return Version(2, 1);
else if (strstr(str.data(), "OpenCL 2.2") != NULL)
return Version(2, 2);
else if (strstr(str.data(), "OpenCL 3.0") != NULL)
return Version(3, 0);
throw std::runtime_error(std::string("Unknown OpenCL version: ") + str.data());
}