From 8b4446d57f2e99cebb7f1935fc114c41af605053 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sun, 1 Aug 2010 15:35:33 -0400 Subject: [PATCH] Fix a few bugs reported by Roman Donchenko. --- doc/source/misc.rst | 1 + doc/source/runtime.rst | 4 +++- src/wrapper/wrap_cl.hpp | 3 ++- src/wrapper/wrap_constants.cpp | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/source/misc.rst b/doc/source/misc.rst index 56ce060c..3d1e1141 100644 --- a/doc/source/misc.rst +++ b/doc/source/misc.rst @@ -84,6 +84,7 @@ Version 0.92 * Add support for the `cl_nv_device_attribute_query <ghttp://www.khronos.org/registry/cl/extensions/khr/cl_nv_device_attribute_query.txt>`_ extension. +* Add :meth:`pyopencl.Kernel.set_args`. Version 0.91.5 diff --git a/doc/source/runtime.rst b/doc/source/runtime.rst index c1c83d8e..00c3ef29 100644 --- a/doc/source/runtime.rst +++ b/doc/source/runtime.rst @@ -565,7 +565,7 @@ Programs and Kernels See :class:`kernel_work_group_info` for values of *param*. - .. method:: set_arg(self, arg) + .. method:: set_arg(self, index, arg) *arg* may be @@ -594,6 +594,8 @@ Programs and Kernels Invoke :meth:`set_arg` on each element of *args* in turn. + ..versionadded:: 0.92 + .. method:: set_scalar_arg_dtypes(arg_dtypes) Inform the wrapper about the sized types of scalar diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp index e001d907..a0762761 100644 --- a/src/wrapper/wrap_cl.hpp +++ b/src/wrapper/wrap_cl.hpp @@ -2575,7 +2575,8 @@ namespace pyopencl std::vector<size_t> result; PYOPENCL_GET_VEC_INFO(KernelWorkGroup, PYOPENCL_FIRST_ARG, param_name, result); - return py::list(result); + + PYOPENCL_RETURN_VECTOR(size_t, result); } case CL_KERNEL_LOCAL_MEM_SIZE: #ifdef CL_VERSION_1_1 diff --git a/src/wrapper/wrap_constants.cpp b/src/wrapper/wrap_constants.cpp index 4f2548bd..a81adc9b 100644 --- a/src/wrapper/wrap_constants.cpp +++ b/src/wrapper/wrap_constants.cpp @@ -167,6 +167,7 @@ void pyopencl_expose_constants() ADD_ATTR(DEVICE_, QUEUE_PROPERTIES); ADD_ATTR(DEVICE_, NAME); ADD_ATTR(DEVICE_, VENDOR); + ADD_ATTR(, DRIVER_VERSION); ADD_ATTR(DEVICE_, VERSION); ADD_ATTR(DEVICE_, PROFILE); ADD_ATTR(DEVICE_, VERSION); -- GitLab