Skip to content

Commit dfa960b

Browse files
authored
remove use of the cl_khr_icd2.h header (#278)
1 parent d71a5da commit dfa960b

4 files changed

Lines changed: 7 additions & 80 deletions

File tree

include/cl_khr_icd2.h

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,4 @@
1616
* OpenCL is a trademark of Apple Inc. used under license by Khronos.
1717
*/
1818

19-
#include <CL/cl.h>
20-
21-
#if !defined(CL_PLATFORM_UNLOADABLE_KHR)
22-
#define CL_PLATFORM_UNLOADABLE_KHR 0x0921
23-
#endif
24-
25-
#if defined(CL_ENABLE_LAYERS) && !defined(CL_LAYER_PROPERTIES_LIST_END)
26-
typedef cl_properties cl_layer_properties;
27-
28-
#define CL_LAYER_PROPERTIES_LIST_END ((cl_layer_properties)0)
29-
30-
typedef cl_int CL_API_CALL
31-
clInitLayerWithProperties_t(
32-
cl_uint num_entries,
33-
const cl_icd_dispatch *target_dispatch,
34-
cl_uint *num_entries_ret,
35-
const cl_icd_dispatch **layer_dispatch_ret,
36-
const cl_layer_properties *properties);
37-
38-
typedef clInitLayerWithProperties_t *pfn_clInitLayerWithProperties;
39-
40-
typedef cl_int CL_API_CALL
41-
clDeinitLayer_t(void);
42-
43-
typedef clDeinitLayer_t *pfn_clDeinitLayer;
44-
#endif //defined(CL_ENABLE_LAYERS) && !defined(CL_LAYER_PROPERTIES_LIST_END)
45-
46-
#if !defined(CL_ICD2_TAG_KHR)
47-
#if INTPTR_MAX == INT32_MAX
48-
#define CL_ICD2_TAG_KHR ((intptr_t)0x434C3331)
49-
#else
50-
#define CL_ICD2_TAG_KHR ((intptr_t)0x4F50454E434C3331)
51-
#endif
52-
53-
typedef void * CL_API_CALL
54-
clIcdGetFunctionAddressForPlatformKHR_t(
55-
cl_platform_id platform,
56-
const char* func_name);
57-
58-
typedef clIcdGetFunctionAddressForPlatformKHR_t *
59-
clIcdGetFunctionAddressForPlatformKHR_fn;
60-
61-
typedef cl_int CL_API_CALL
62-
clIcdSetPlatformDispatchDataKHR_t(
63-
cl_platform_id platform,
64-
void *disp_data);
65-
66-
typedef clIcdSetPlatformDispatchDataKHR_t *
67-
clIcdSetPlatformDispatchDataKHR_fn;
68-
#endif // !defined(CL_ICD2_TAG_KHR)
19+
/* This is intentionally empty and left as a placeholder. */

test/driver_stub/cl.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
#include "rename_api.h"
1616

1717
#include <CL/cl.h>
18+
#include <CL/cl_ext.h>
1819
#include <platform/icd_test_log.h>
1920
#include "icd_structs.h"
20-
#include "cl_khr_icd2.h"
21-
22-
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
23-
CL_API_ENTRY cl_int CL_API_CALL
24-
clIcdGetPlatformIDsKHR(cl_uint, cl_platform_id *, cl_uint *);
2521

2622
struct _cl_platform_id
2723
{

test/driver_stub/cl_ext.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
#include <string.h>
22

33
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
4-
#include "CL/cl.h"
5-
#include "CL/cl_ext.h"
6-
#include "cl_khr_icd2.h"
7-
8-
#if defined(CL_ENABLE_ICD2)
9-
CL_API_ENTRY clIcdGetFunctionAddressForPlatformKHR_t clIcdGetFunctionAddressForPlatformKHR;
10-
CL_API_ENTRY clIcdSetPlatformDispatchDataKHR_t clIcdSetPlatformDispatchDataKHR;
11-
#endif
4+
#include <CL/cl.h>
5+
#include <CL/cl_ext.h>
126

137
struct driverStubextFunc_st
148
{

test/driver_stub/icd.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,9 @@
1515
// themselves via the dispatch table. Include this before cl headers.
1616
#include "rename_api.h"
1717

18-
#include "CL/cl.h"
19-
#include "CL/cl_gl.h"
20-
21-
#if defined(CL_ENABLE_ICD2)
22-
#include "cl_khr_icd2.h"
23-
CL_API_ENTRY clIcdGetFunctionAddressForPlatformKHR_t clIcdGetFunctionAddressForPlatformKHR;
24-
CL_API_ENTRY clIcdSetPlatformDispatchDataKHR_t clIcdSetPlatformDispatchDataKHR;
25-
#endif
26-
27-
/*
28-
* Prototypes for deprecated functions no longer present in cl.h
29-
*/
30-
extern CL_API_ENTRY cl_int CL_API_CALL
31-
clSetCommandQueueProperty(cl_command_queue /* command_queue */,
32-
cl_command_queue_properties /* properties */,
33-
cl_bool /* enable */,
34-
cl_command_queue_properties * /* old_properties */);
18+
#include <CL/cl.h>
19+
#include <CL/cl_gl.h>
20+
#include <CL/cl_ext.h>
3521

3622
#define ICD_DISPATCH_TABLE_ENTRY(fn) \
3723
assert(dispatchTable->entryCount < 256); \

0 commit comments

Comments
 (0)