From 8eb34188c516728d38bcec6ad9fb305def51033b Mon Sep 17 00:00:00 2001
From: Yichao Yu <yyc1992@gmail.com>
Date: Thu, 19 Jun 2014 00:36:19 +0800
Subject: [PATCH] rename make_argbuf

---
 src/c_wrapper/command_queue.h | 2 +-
 src/c_wrapper/context.cpp     | 4 ++--
 src/c_wrapper/event.cpp       | 3 +--
 src/c_wrapper/platform.cpp    | 8 ++++----
 src/c_wrapper/utils.h         | 4 ++--
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/c_wrapper/command_queue.h b/src/c_wrapper/command_queue.h
index 4ad5450a..c5970d31 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 cd6e49ab..628b6c5e 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 61af726c..e618937a 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 b4b993e9..7c955330 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 ddb45bf9..512b5f83 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);
 }
-- 
GitLab