Skip to content

Commit b8e5157

Browse files
wenju-hebader
authored andcommitted
[SYCL][USM] Fix CL_MEM_ALLOC_INFO_* macros in USM header (#721)
Fix CL_MEM_ALLOC_INFO_* macro and add const to properties arguments. Signed-off-by: Wenju He <[email protected]>
1 parent 5c8e81f commit b8e5157

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

sycl/include/CL/cl_usm_ext.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ typedef cl_uint cl_mem_info_intel;
5252
#define CL_MEM_ALLOC_TYPE_INTEL 0x419A
5353
#define CL_MEM_ALLOC_BASE_PTR_INTEL 0x419B
5454
#define CL_MEM_ALLOC_SIZE_INTEL 0x419C
55-
#define CL_MEM_ALLOC_INFO_DEVICE_INTEL 0x419D
55+
#define CL_MEM_ALLOC_DEVICE_INTEL 0x419D
5656
/* CL_MEM_ALLOC_FLAGS_INTEL - defined above */
57-
#define CL_MEM_ALLOC_INFO_TBD1_INTEL 0x419E /* reserved for future */
58-
#define CL_MEM_ALLOC_INFO_TBD2_INTEL 0x419F /* reserved for future */
57+
#define CL_MEM_ALLOC_INFO_TBD0_INTEL 0x419E /* reserved for future */
58+
#define CL_MEM_ALLOC_INFO_TBD1_INTEL 0x419F /* reserved for future */
5959

6060
typedef cl_uint cl_unified_shared_memory_type_intel;
6161

@@ -90,31 +90,32 @@ typedef cl_uint cl_mem_advice_intel;
9090
#define CL_COMMAND_MEMADVISE_INTEL 0x4207
9191

9292
extern CL_API_ENTRY void *CL_API_CALL
93-
clHostMemAllocINTEL(cl_context context, cl_mem_properties_intel *properties,
93+
clHostMemAllocINTEL(cl_context context,
94+
const cl_mem_properties_intel *properties,
9495
size_t size, cl_uint alignment, cl_int *errcode_ret);
9596

9697
typedef CL_API_ENTRY void *(CL_API_CALL *clHostMemAllocINTEL_fn)(
97-
cl_context context, cl_mem_properties_intel *properties, size_t size,
98+
cl_context context, const cl_mem_properties_intel *properties, size_t size,
9899
cl_uint alignment, cl_int *errcode_ret);
99100

100101
extern CL_API_ENTRY void *CL_API_CALL
101102
clDeviceMemAllocINTEL(cl_context context, cl_device_id device,
102-
cl_mem_properties_intel *properties, // TBD: needed?
103+
const cl_mem_properties_intel *properties, // TBD: needed?
103104
size_t size, cl_uint alignment, cl_int *errcode_ret);
104105

105106
typedef CL_API_ENTRY void *(CL_API_CALL *clDeviceMemAllocINTEL_fn)(
106107
cl_context context, cl_device_id device,
107-
cl_mem_properties_intel *properties, // TBD: needed?
108+
const cl_mem_properties_intel *properties, // TBD: needed?
108109
size_t size, cl_uint alignment, cl_int *errcode_ret);
109110

110111
extern CL_API_ENTRY void *CL_API_CALL
111112
clSharedMemAllocINTEL(cl_context context, cl_device_id device,
112-
cl_mem_properties_intel *properties, // TBD: needed?
113+
const cl_mem_properties_intel *properties, // TBD: needed?
113114
size_t size, cl_uint alignment, cl_int *errcode_ret);
114115

115116
typedef CL_API_ENTRY void *(CL_API_CALL *clSharedMemAllocINTEL_fn)(
116117
cl_context context, cl_device_id device,
117-
cl_mem_properties_intel *properties, // TBD: needed?
118+
const cl_mem_properties_intel *properties, // TBD: needed?
118119
size_t size, cl_uint alignment, cl_int *errcode_ret);
119120

120121
extern CL_API_ENTRY cl_int CL_API_CALL

0 commit comments

Comments
 (0)