clover: Unabbreviate a few data accessor names for consistency.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 18 Feb 2014 12:12:52 +0000 (13:12 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 21 Feb 2014 11:51:23 +0000 (12:51 +0100)
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/state_trackers/clover/api/context.cpp
src/gallium/state_trackers/clover/api/memory.cpp
src/gallium/state_trackers/clover/api/program.cpp
src/gallium/state_trackers/clover/api/queue.cpp
src/gallium/state_trackers/clover/core/context.cpp
src/gallium/state_trackers/clover/core/context.hpp
src/gallium/state_trackers/clover/core/format.cpp
src/gallium/state_trackers/clover/core/queue.cpp
src/gallium/state_trackers/clover/core/queue.hpp

index a78c00b72a766b6ad6581a25265a3af5d775e5eb..021eea36f6edc3f61ff31042307b68c418666c21 100644 (file)
@@ -117,15 +117,15 @@ clGetContextInfo(cl_context d_ctx, cl_context_info param,
       break;
 
    case CL_CONTEXT_NUM_DEVICES:
-      buf.as_scalar<cl_uint>() = ctx.devs().size();
+      buf.as_scalar<cl_uint>() = ctx.devices().size();
       break;
 
    case CL_CONTEXT_DEVICES:
-      buf.as_vector<cl_device_id>() = descs(ctx.devs());
+      buf.as_vector<cl_device_id>() = descs(ctx.devices());
       break;
 
    case CL_CONTEXT_PROPERTIES:
-      buf.as_vector<cl_context_properties>() = desc(ctx.props());
+      buf.as_vector<cl_context_properties>() = desc(ctx.properties());
       break;
 
    default:
index 84b3bcb4c09d8af7787291f8a00ded5f7908776f..7ed2191f14e2a4d7d68c920ce312a4560d2f9f13 100644 (file)
@@ -38,7 +38,7 @@ clCreateBuffer(cl_context d_ctx, cl_mem_flags flags, size_t size,
 
    if (!size ||
        size > fold(maximum(), cl_ulong(0),
-                   map(std::mem_fn(&device::max_mem_alloc_size), ctx.devs())
+                   map(std::mem_fn(&device::max_mem_alloc_size), ctx.devices())
           ))
       throw error(CL_INVALID_BUFFER_SIZE);
 
index 8867ee97c5877976e875cbb7eb8bf85e44bbf7cb..fedc91d531a0163197a77f7820704bd5066f9c83 100644 (file)
@@ -64,7 +64,7 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
       throw error(CL_INVALID_VALUE);
 
    if (any_of([&](const device &dev) {
-            return !count(dev, ctx.devs());
+            return !count(dev, ctx.devices());
          }, devs))
       throw error(CL_INVALID_DEVICE);
 
@@ -133,7 +133,7 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs,
                void *user_data) try {
    auto &prog = obj(d_prog);
    auto devs = (d_devs ? objs(d_devs, num_devs) :
-                ref_vector<device>(prog.context().devs()));
+                ref_vector<device>(prog.context().devices()));
    auto opts = (p_opts ? p_opts : "");
 
    if (bool(num_devs) != bool(d_devs) ||
@@ -141,7 +141,7 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs,
       throw error(CL_INVALID_VALUE);
 
    if (any_of([&](const device &dev) {
-            return !count(dev, prog.context().devs());
+            return !count(dev, prog.context().devices());
          }, devs))
       throw error(CL_INVALID_DEVICE);
 
@@ -175,13 +175,13 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param,
    case CL_PROGRAM_NUM_DEVICES:
       buf.as_scalar<cl_uint>() = (prog.devices().size() ?
                                   prog.devices().size() :
-                                  prog.context().devs().size());
+                                  prog.context().devices().size());
       break;
 
    case CL_PROGRAM_DEVICES:
       buf.as_vector<cl_device_id>() = (prog.devices().size() ?
                                        descs(prog.devices()) :
-                                       descs(prog.context().devs()));
+                                       descs(prog.context().devices()));
       break;
 
    case CL_PROGRAM_SOURCE:
@@ -226,7 +226,7 @@ clGetProgramBuildInfo(cl_program d_prog, cl_device_id d_dev,
    auto &prog = obj(d_prog);
    auto &dev = obj(d_dev);
 
-   if (!count(dev, prog.context().devs()))
+   if (!count(dev, prog.context().devices()))
       return CL_INVALID_DEVICE;
 
    switch (param) {
index 8498e977b9cacc1809b190afc0eadcd121d73aea..a136018fbde64b8150d199c07304b707d3251284 100644 (file)
@@ -32,7 +32,7 @@ clCreateCommandQueue(cl_context d_ctx, cl_device_id d_dev,
    auto &ctx = obj(d_ctx);
    auto &dev = obj(d_dev);
 
-   if (!count(dev, ctx.devs()))
+   if (!count(dev, ctx.devices()))
       throw error(CL_INVALID_DEVICE);
 
    if (props & ~(CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE |
@@ -87,7 +87,7 @@ clGetCommandQueueInfo(cl_command_queue d_q, cl_command_queue_info param,
       break;
 
    case CL_QUEUE_PROPERTIES:
-      buf.as_scalar<cl_command_queue_properties>() = q.props();
+      buf.as_scalar<cl_command_queue_properties>() = q.properties();
       break;
 
    default:
index 34ffd9f29ef9d1ece7bbb0129667b1f3b4ab3455..bf4df39dc2a865a6cbcbd5ea5162a5d4b9d2af07 100644 (file)
@@ -26,7 +26,7 @@ using namespace clover;
 
 context::context(const property_list &props,
                  const ref_vector<device> &devs) :
-   _props(props), _devs(devs) {
+   props(props), devs(devs) {
 }
 
 bool
@@ -40,11 +40,11 @@ context::operator!=(const context &ctx) const {
 }
 
 const context::property_list &
-context::props() const {
-   return _props;
+context::properties() const {
+   return props;
 }
 
 context::device_range
-context::devs() const {
-   return map(evals(), _devs);
+context::devices() const {
+   return map(evals(), devs);
 }
index ef14f1578d5b56282801fbed7cb95af271d86c97..0ec4ff4a231cb66699bd50c13ba5243d78f2b961 100644 (file)
@@ -48,14 +48,14 @@ namespace clover {
       operator!=(const context &ctx) const;
 
       const property_list &
-      props() const;
+      properties() const;
 
       device_range
-      devs() const;
+      devices() const;
 
    private:
-      property_list _props;
-      const std::vector<intrusive_ref<device>> _devs;
+      property_list props;
+      const std::vector<intrusive_ref<device>> devs;
    };
 }
 
index 79582306a6093878452436200569825ba3b0f892..aee1cc9c79d7b296afb7dc2a8d89bf2cb3eeff0c 100644 (file)
@@ -155,7 +155,7 @@ namespace clover {
          if (all_of([=](const device &dev) {
                   return dev.pipe->is_format_supported(
                      dev.pipe, f.second, target, 1, bindings);
-               }, ctx.devs()))
+               }, ctx.devices()))
             s.insert(f.first);
       }
 
index 246d927a931788be9df2b8d76837adc344944d29..24f9326662da17d390fe5cf28185b16d5ce3e01c 100644 (file)
@@ -29,7 +29,7 @@ using namespace clover;
 
 command_queue::command_queue(clover::context &ctx, clover::device &dev,
                              cl_command_queue_properties props) :
-   context(ctx), device(dev), _props(props) {
+   context(ctx), device(dev), props(props) {
    pipe = dev.pipe->context_create(dev.pipe, NULL);
    if (!pipe)
       throw error(CL_INVALID_DEVICE);
@@ -58,13 +58,13 @@ command_queue::flush() {
 }
 
 cl_command_queue_properties
-command_queue::props() const {
-   return _props;
+command_queue::properties() const {
+   return props;
 }
 
 bool
 command_queue::profiling_enabled() const {
-   return _props & CL_QUEUE_PROFILING_ENABLE;
+   return props & CL_QUEUE_PROFILING_ENABLE;
 }
 
 void
index 19cb8910976fc660c491e078ceb754d9cf336af1..b7166e685b75e50987546bfa868a9680f55616a4 100644 (file)
@@ -47,7 +47,7 @@ namespace clover {
 
       void flush();
 
-      cl_command_queue_properties props() const;
+      cl_command_queue_properties properties() const;
       bool profiling_enabled() const;
 
       const intrusive_ref<clover::context> context;
@@ -67,7 +67,7 @@ namespace clover {
       /// and push it to the pending list.
       void sequence(hard_event &ev);
 
-      cl_command_queue_properties _props;
+      cl_command_queue_properties props;
       pipe_context *pipe;
       std::deque<intrusive_ref<hard_event>> queued_events;
    };