From 05ab43ed58bfb18c2ac97589c5a1efda7fbbd9b5 Mon Sep 17 00:00:00 2001 From: Kyle Lutz Date: Wed, 3 Aug 2016 20:16:16 -0700 Subject: [PATCH] Cast index argument to cl_uint in kernel::get_arg_info() This casts the 'index' argument in kernel::get_arg_info() to cl_uint in order to match the signature for clGetKernelArgInfo(). This fixes the "conversion from 'size_t' to 'cl_uint', possible loss of data" compiler warning. --- include/boost/compute/kernel.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/compute/kernel.hpp b/include/boost/compute/kernel.hpp index 9e6e0953..caa1e79b 100644 --- a/include/boost/compute/kernel.hpp +++ b/include/boost/compute/kernel.hpp @@ -188,7 +188,9 @@ public: template T get_arg_info(size_t index, cl_kernel_arg_info info) const { - return detail::get_object_info(clGetKernelArgInfo, m_kernel, info, index); + return detail::get_object_info( + clGetKernelArgInfo, m_kernel, info, static_cast(index) + ); } /// \overload