diff --git a/src/c_wrapper/command_queue.h b/src/c_wrapper/command_queue.h index 4ad5450a3efb758bba25cc9e64f9f2744e217ef7..c5970d31e4168acaf475cc3a187b40ac5ac0c05a 100644 --- a/src/c_wrapper/command_queue.h +++ b/src/c_wrapper/command_queue.h @@ -46,7 +46,7 @@ public: { cl_command_queue_properties old_prop; pyopencl_call_guarded(clSetCommandQueueProperty, this, prop, - cast_bool(enable), make_argbuf(old_prop)); + cast_bool(enable), arg_buf(old_prop)); return old_prop; } #endif diff --git a/src/c_wrapper/context.cpp b/src/c_wrapper/context.cpp index cd6e49ab6aa946d5c1815a7785f740d6d8cbc552..628b6c5e09edc328cfef16b3e321b1427c5ca0c9 100644 --- a/src/c_wrapper/context.cpp +++ b/src/c_wrapper/context.cpp @@ -110,10 +110,10 @@ context__get_supported_image_formats(clobj_t _ctx, cl_mem_flags flags, return c_handle_error([&] { cl_uint num; pyopencl_call_guarded(clGetSupportedImageFormats, ctx, flags, - image_type, 0, nullptr, make_argbuf(num)); + image_type, 0, nullptr, arg_buf(num)); pyopencl_buf<cl_image_format> formats(num); pyopencl_call_guarded(clGetSupportedImageFormats, ctx, flags, - image_type, formats, make_argbuf(num)); + image_type, formats, arg_buf(num)); *out = pyopencl_convert_array_info(cl_image_format, formats); }); } diff --git a/src/c_wrapper/event.cpp b/src/c_wrapper/event.cpp index 61af726ceb1c58793ac2d6e37ae4e255c7ab1b58..e618937ab491d10f533428406dd25c1e1e482ea6 100644 --- a/src/c_wrapper/event.cpp +++ b/src/c_wrapper/event.cpp @@ -75,8 +75,7 @@ event::get_profiling_info(cl_profiling_info param) const void event::wait() { - pyopencl_call_guarded(clWaitForEvents, - make_argbuf<ArgType::Length>(data())); + pyopencl_call_guarded(clWaitForEvents, arg_buf<ArgType::Length>(data())); finished(); } diff --git a/src/c_wrapper/platform.cpp b/src/c_wrapper/platform.cpp index b4b993e90f03bbb3431e1de6d96ed080021c5b03..7c955330af66ec0d85cfe075203bf017cd37d298 100644 --- a/src/c_wrapper/platform.cpp +++ b/src/c_wrapper/platform.cpp @@ -35,10 +35,10 @@ get_platforms(clobj_t **_platforms, uint32_t *num_platforms) return c_handle_error([&] { *num_platforms = 0; pyopencl_call_guarded(clGetPlatformIDs, 0, nullptr, - make_argbuf(*num_platforms)); + arg_buf(*num_platforms)); pyopencl_buf<cl_platform_id> platforms(*num_platforms); pyopencl_call_guarded(clGetPlatformIDs, platforms, - make_argbuf(*num_platforms)); + arg_buf(*num_platforms)); *_platforms = buf_to_base<platform>(platforms).release(); }); } @@ -52,7 +52,7 @@ platform__get_devices(clobj_t _plat, clobj_t **_devices, *num_devices = 0; try { pyopencl_call_guarded(clGetDeviceIDs, plat, devtype, 0, nullptr, - make_argbuf(*num_devices)); + arg_buf(*num_devices)); } catch (const clerror &e) { if (e.code() != CL_DEVICE_NOT_FOUND) throw e; @@ -64,7 +64,7 @@ platform__get_devices(clobj_t _plat, clobj_t **_devices, } pyopencl_buf<cl_device_id> devices(*num_devices); pyopencl_call_guarded(clGetDeviceIDs, plat, devtype, devices, - make_argbuf(*num_devices)); + arg_buf(*num_devices)); *_devices = buf_to_base<device>(devices).release(); }); } diff --git a/src/c_wrapper/utils.h b/src/c_wrapper/utils.h index ddb45bf9847bc67c3df4ddec57cb7b7d40fa5225..512b5f83306009836391c5e82df94de70cb9cef1 100644 --- a/src/c_wrapper/utils.h +++ b/src/c_wrapper/utils.h @@ -118,14 +118,14 @@ public: template<ArgType AT=ArgType::None, typename T> static PYOPENCL_INLINE ArgBuffer<T, AT> -make_argbuf(T &buf) +arg_buf(T &buf) { return ArgBuffer<T, AT>(&buf, 1); } template<ArgType AT=ArgType::None, typename T> static PYOPENCL_INLINE ArgBuffer<T, AT> -make_argbuf(T *buf, size_t l) +arg_buf(T *buf, size_t l) { return ArgBuffer<T, AT>(buf, l); }