Skip to content

Commit 2bd90c6

Browse files
committed
Fix C4267 warn. when compiling with MSVC, OpenCL 2.0
1 parent 45ea54f commit 2bd90c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/compute/kernel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class kernel
267267
void set_arg_svm_ptr(size_t index, void* ptr)
268268
{
269269
#ifdef CL_VERSION_2_0
270-
cl_int ret = clSetKernelArgSVMPointer(m_kernel, index, ptr);
270+
cl_int ret = clSetKernelArgSVMPointer(m_kernel, static_cast<cl_uint>(index), ptr);
271271
if(ret != CL_SUCCESS){
272272
BOOST_THROW_EXCEPTION(opencl_error(ret));
273273
}

0 commit comments

Comments
 (0)