Skip to content

Commit be85263

Browse files
authored
Merge pull request boostorg#805 from jszuppe/fix_travis_ci
Update CL version selection, fix Travis CI
2 parents 2a12dee + 494acec commit be85263

File tree

8 files changed

+138
-314
lines changed

8 files changed

+138
-314
lines changed

.travis.yml

Lines changed: 67 additions & 217 deletions
Large diffs are not rendered by default.

.travis/amd_sdk.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

include/boost/compute/cl.hpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,7 @@
1111
#ifndef BOOST_COMPUTE_CL_HPP
1212
#define BOOST_COMPUTE_CL_HPP
1313

14-
#if defined(BOOST_COMPUTE_MAX_CL_VERSION)
15-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 202
16-
# define CL_USE_DEPRECATED_OPENCL_2_1_APIS
17-
# endif
18-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 201
19-
# define CL_USE_DEPRECATED_OPENCL_2_0_APIS
20-
# endif
21-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 200
22-
# define CL_USE_DEPRECATED_OPENCL_1_2_APIS
23-
# endif
24-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 102
25-
# define CL_USE_DEPRECATED_OPENCL_1_1_APIS
26-
# endif
27-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 101
28-
# define CL_USE_DEPRECATED_OPENCL_1_0_APIS
29-
# endif
30-
#endif
14+
#include <boost/compute/detail/cl_versions.hpp>
3115

3216
#if defined(__APPLE__)
3317
#include <OpenCL/cl.h>

include/boost/compute/cl_ext.hpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,7 @@
1111
#ifndef BOOST_COMPUTE_CL_EXT_HPP
1212
#define BOOST_COMPUTE_CL_EXT_HPP
1313

14-
#if defined(BOOST_COMPUTE_MAX_CL_VERSION)
15-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 202
16-
# define CL_USE_DEPRECATED_OPENCL_2_1_APIS
17-
# endif
18-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 201
19-
# define CL_USE_DEPRECATED_OPENCL_2_0_APIS
20-
# endif
21-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 200
22-
# define CL_USE_DEPRECATED_OPENCL_1_2_APIS
23-
# endif
24-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 102
25-
# define CL_USE_DEPRECATED_OPENCL_1_1_APIS
26-
# endif
27-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 101
28-
# define CL_USE_DEPRECATED_OPENCL_1_0_APIS
29-
# endif
30-
#endif
14+
#include "detail/cl_versions.hpp"
3115

3216
#if defined(__APPLE__)
3317
#include <OpenCL/cl_ext.h>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//---------------------------------------------------------------------------//
2+
// Copyright (c) 2018 Jakub Szuppe <[email protected]>
3+
//
4+
// Distributed under the Boost Software License, Version 1.0
5+
// See accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt
7+
//
8+
// See http://boostorg.github.com/compute for more information.
9+
//---------------------------------------------------------------------------//
10+
11+
#ifndef BOOST_COMPUTE_DETAIL_CL_VERSION_HPP
12+
#define BOOST_COMPUTE_DETAIL_CL_VERSION_HPP
13+
14+
#if defined(BOOST_COMPUTE_MAX_CL_VERSION)
15+
# if !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 202
16+
# define CL_USE_DEPRECATED_OPENCL_2_1_APIS
17+
# endif
18+
# if !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 201
19+
# define CL_USE_DEPRECATED_OPENCL_2_0_APIS
20+
# endif
21+
# if !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 200
22+
# define CL_USE_DEPRECATED_OPENCL_1_2_APIS
23+
# endif
24+
# if !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 102
25+
# define CL_USE_DEPRECATED_OPENCL_1_1_APIS
26+
# endif
27+
# if !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 101
28+
# define CL_USE_DEPRECATED_OPENCL_1_0_APIS
29+
# endif
30+
#endif
31+
32+
#if defined(BOOST_COMPUTE_MAX_CL_VERSION) && !defined(CL_TARGET_OPENCL_VERSION)
33+
# if BOOST_COMPUTE_MAX_CL_VERSION == 201
34+
# define CL_TARGET_OPENCL_VERSION 210
35+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 200
36+
# define CL_TARGET_OPENCL_VERSION 200
37+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 102
38+
# define CL_TARGET_OPENCL_VERSION 120
39+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 101
40+
# define CL_TARGET_OPENCL_VERSION 110
41+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 100
42+
# define CL_TARGET_OPENCL_VERSION 100
43+
# else
44+
# define CL_TARGET_OPENCL_VERSION 220
45+
# endif
46+
#endif
47+
48+
#if defined(BOOST_COMPUTE_MAX_CL_VERSION) && defined(CL_TARGET_OPENCL_VERSION)
49+
# if BOOST_COMPUTE_MAX_CL_VERSION == 202 && CL_TARGET_OPENCL_VERSION != 220
50+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
51+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 201 && CL_TARGET_OPENCL_VERSION != 210
52+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
53+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 200 && CL_TARGET_OPENCL_VERSION != 200
54+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
55+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 102 && CL_TARGET_OPENCL_VERSION != 120
56+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
57+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 101 && CL_TARGET_OPENCL_VERSION != 110
58+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
59+
# elif BOOST_COMPUTE_MAX_CL_VERSION == 100 && CL_TARGET_OPENCL_VERSION != 100
60+
# error "Boost.Compute: CL_TARGET_OPENCL_VERSION definition does not match BOOST_COMPUTE_MAX_CL_VERSION"
61+
# endif
62+
#endif
63+
64+
#endif // BOOST_COMPUTE_DETAIL_CL_VERSION_HPP

include/boost/compute/detail/nvidia_compute_capability.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
#include <boost/compute/device.hpp>
1515

16-
#ifdef BOOST_COMPUTE_HAVE_HDR_CL_EXT
16+
#ifdef BOOST_COMPUTE_HAVE_HDR_CL_EXT
17+
#include <boost/compute/detail/cl_versions.hpp>
1718
#include <CL/cl_ext.h>
1819
#endif
1920

include/boost/compute/interop/opengl/cl_gl.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#ifndef BOOST_COMPUTE_INTEROP_OPENGL_CL_GL_HPP
1212
#define BOOST_COMPUTE_INTEROP_OPENGL_CL_GL_HPP
1313

14+
#include <boost/compute/detail/cl_versions.hpp>
15+
1416
#if defined(__APPLE__)
1517
#include <OpenCL/cl_gl.h>
1618
#else

include/boost/compute/interop/opengl/cl_gl_ext.hpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,7 @@
1111
#ifndef BOOST_COMPUTE_INTEROP_OPENGL_CL_GL_EXT_HPP
1212
#define BOOST_COMPUTE_INTEROP_OPENGL_CL_GL_EXT_HPP
1313

14-
#if defined(BOOST_COMPUTE_MAX_CL_VERSION)
15-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 202
16-
# define CL_USE_DEPRECATED_OPENCL_2_1_APIS
17-
# endif
18-
# if !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 201
19-
# define CL_USE_DEPRECATED_OPENCL_2_0_APIS
20-
# endif
21-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 200
22-
# define CL_USE_DEPRECATED_OPENCL_1_2_APIS
23-
# endif
24-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 102
25-
# define CL_USE_DEPRECATED_OPENCL_1_1_APIS
26-
# endif
27-
# if !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS) && BOOST_COMPUTE_MAX_CL_VERSION < 101
28-
# define CL_USE_DEPRECATED_OPENCL_1_0_APIS
29-
# endif
30-
#endif
14+
#include <boost/compute/detail/cl_versions.hpp>
3115

3216
#if defined(__APPLE__)
3317
#include <OpenCL/cl_gl_ext.h>

0 commit comments

Comments
 (0)