2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-26 06:22:37 +00:00

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.
This commit is contained in:
Kyle Lutz
2016-08-03 20:16:16 -07:00
parent 6688e92f07
commit 05ab43ed58

View File

@@ -188,7 +188,9 @@ public:
template<class T>
T get_arg_info(size_t index, cl_kernel_arg_info info) const
{
return detail::get_object_info<T>(clGetKernelArgInfo, m_kernel, info, index);
return detail::get_object_info<T>(
clGetKernelArgInfo, m_kernel, info, static_cast<cl_uint>(index)
);
}
/// \overload