summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/api
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-09-17 23:13:48 -0700
committerFrancisco Jerez <[email protected]>2013-10-21 10:47:02 -0700
commit8e14b82fd2c561cac3e0d5f84d5f67815ad53867 (patch)
tree140cc8c26fb0f55ceec664e1e5650325ba98771d /src/gallium/state_trackers/clover/api
parentebfdce079b8f99f92dff4d58a53c27e0888c373f (diff)
clover: Replace a bunch of double underscores with single underscores.
Identifiers with double underscores are reserved, and using them has undefined behavior according to the C++ spec. It's unlikely to make any difference, but... Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r--src/gallium/state_trackers/clover/api/platform.cpp8
-rw-r--r--src/gallium/state_trackers/clover/api/transfer.cpp12
-rw-r--r--src/gallium/state_trackers/clover/api/util.hpp4
3 files changed, 13 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/clover/api/platform.cpp b/src/gallium/state_trackers/clover/api/platform.cpp
index bfac67bc55a..1f996a38299 100644
--- a/src/gallium/state_trackers/clover/api/platform.cpp
+++ b/src/gallium/state_trackers/clover/api/platform.cpp
@@ -25,7 +25,9 @@
using namespace clover;
-static platform __platform;
+namespace {
+ platform _clover_platform;
+}
PUBLIC cl_int
clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
@@ -37,7 +39,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
if (num_platforms)
*num_platforms = 1;
if (platforms)
- *platforms = &__platform;
+ *platforms = &_clover_platform;
return CL_SUCCESS;
}
@@ -45,7 +47,7 @@ clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms,
PUBLIC cl_int
clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
size_t size, void *buf, size_t *size_ret) {
- if (platform != &__platform)
+ if (platform != &_clover_platform)
return CL_INVALID_PLATFORM;
switch (param_name) {
diff --git a/src/gallium/state_trackers/clover/api/transfer.cpp b/src/gallium/state_trackers/clover/api/transfer.cpp
index 1615d6fdfdd..43036da528d 100644
--- a/src/gallium/state_trackers/clover/api/transfer.cpp
+++ b/src/gallium/state_trackers/clover/api/transfer.cpp
@@ -67,9 +67,9 @@ namespace {
/// \a T. The return value of get() should be implicitly
/// convertible to \a void *.
///
- template<typename T> struct __map;
+ template<typename T> struct _map;
- template<> struct __map<void *> {
+ template<> struct _map<void *> {
static void *
get(cl_command_queue q, void *obj, cl_map_flags flags,
size_t offset, size_t size) {
@@ -77,7 +77,7 @@ namespace {
}
};
- template<> struct __map<const void *> {
+ template<> struct _map<const void *> {
static const void *
get(cl_command_queue q, const void *obj, cl_map_flags flags,
size_t offset, size_t size) {
@@ -85,7 +85,7 @@ namespace {
}
};
- template<> struct __map<memory_obj *> {
+ template<> struct _map<memory_obj *> {
static mapping
get(cl_command_queue q, memory_obj *obj, cl_map_flags flags,
size_t offset, size_t size) {
@@ -104,9 +104,9 @@ namespace {
S src_obj, const point &src_orig, const point &src_pitch,
const point &region) {
return [=](event &) {
- auto dst = __map<T>::get(q, dst_obj, CL_MAP_WRITE,
+ auto dst = _map<T>::get(q, dst_obj, CL_MAP_WRITE,
dst_pitch(dst_orig), dst_pitch(region));
- auto src = __map<S>::get(q, src_obj, CL_MAP_READ,
+ auto src = _map<S>::get(q, src_obj, CL_MAP_READ,
src_pitch(src_orig), src_pitch(region));
point p;
diff --git a/src/gallium/state_trackers/clover/api/util.hpp b/src/gallium/state_trackers/clover/api/util.hpp
index 6503d93b17d..5765587ffac 100644
--- a/src/gallium/state_trackers/clover/api/util.hpp
+++ b/src/gallium/state_trackers/clover/api/util.hpp
@@ -20,8 +20,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
//
-#ifndef __CL_UTIL_HPP__
-#define __CL_UTIL_HPP__
+#ifndef _CL_UTIL_HPP_
+#define _CL_UTIL_HPP_
#include <cstdint>
#include <cstring>