silence warnings from generic OpenCL header files (as seen on Fedora 31)

This commit is contained in:
Axel Kohlmeyer 2020-01-06 17:34:26 -05:00
parent 8ac2da792c
commit 66a473455e
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 16 additions and 0 deletions

View File

@ -28,6 +28,14 @@
#include <vector>
#include <iostream>
/* We default to OpenCL 1.2 as target version for now as
* there are known issues with OpenCL 2.0 and later.
* This is also to silence warnings from generic OpenCL headers */
#if !defined(CL_TARGET_OPENCL_VERSION)
#define CL_TARGET_OPENCL_VERSION 120
#endif
#ifdef __APPLE__
#include <OpenCL/cl.h>
#include <OpenCL/cl_platform.h>

View File

@ -4,6 +4,14 @@
#include <cstdio>
#include <cassert>
/* We default to OpenCL 1.2 as target version for now as
* there are known issues with OpenCL 2.0 and later.
* This is also to silence warnings from generic OpenCL headers */
#if !defined(CL_TARGET_OPENCL_VERSION)
#define CL_TARGET_OPENCL_VERSION 120
#endif
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else