Commit 774d9eed authored by Dominik Charousset's avatar Dominik Charousset

Enforce coding conventions for namespaces

parent 37c4ed35
......@@ -44,7 +44,8 @@
#include "cppa/opencl/smart_ptr.hpp"
#include "cppa/util/scope_guard.hpp"
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
template<typename T, typename R>
class command : public ref_counted {
......@@ -95,7 +96,7 @@ class command : public ref_counted {
(m_events.empty() ? nullptr : m_events.data()),
&event_k);
if (err != CL_SUCCESS) {
CPPA_LOGMF(CPPA_ERROR, "clEnqueueNDRangeKernel: "
CPPA_LOGMF(CPPA_ERROR, "clEnqueueNDRangeKernel: "
<< get_opencl_error(err));
this->deref(); // or can anything actually happen?
return;
......@@ -157,6 +158,7 @@ class command : public ref_counted {
}
};
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_COMMAND_HPP
......@@ -36,7 +36,8 @@
#include "cppa/opencl/program.hpp"
#include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
class device_info {
......@@ -84,7 +85,8 @@ inline dim_vec device_info::get_max_work_items_per_dim() {
return m_max_work_items_per_dim;
}
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // DEVICE_INFO_HPP
......@@ -42,7 +42,8 @@
#include <CL/opencl.h>
#endif
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
/**
* @brief A vector of up to three elements used for OpenCL dimensions.
......@@ -54,6 +55,8 @@ std::string get_opencl_error(cl_int err);
cl_int clReleaseDeviceDummy (cl_device_id);
cl_int clRetainDeviceDummy (cl_device_id);
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_GLOBAL_HPP
......@@ -48,7 +48,8 @@
#include "cppa/detail/singleton_mixin.hpp"
#include "cppa/detail/singleton_manager.hpp"
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
class opencl_metainfo {
......@@ -77,6 +78,8 @@ class opencl_metainfo {
opencl_metainfo* get_opencl_metainfo();
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // OPENCL_METAINFO_HPP
......@@ -37,7 +37,8 @@
#include "cppa/opencl/global.hpp"
#include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
template<typename Signature>
class actor_facade;
......@@ -69,6 +70,8 @@ class program {
};
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_PROGRAM_HPP
......@@ -36,7 +36,8 @@
#include <algorithm>
#include <type_traits>
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)>
class smart_ptr {
......@@ -119,6 +120,8 @@ typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy>
typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue>
command_queue_ptr;
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // SMART_PTR_HPP
......@@ -30,7 +30,8 @@
#include "cppa/opencl/global.hpp"
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
std::string get_opencl_error(cl_int err) {
switch (err) {
......@@ -135,4 +136,6 @@ std::string get_opencl_error(cl_int err) {
cl_int clReleaseDeviceDummy (cl_device_id) { return 0; }
cl_int clRetainDeviceDummy (cl_device_id) { return 0; }
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
......@@ -32,7 +32,8 @@
using namespace std;
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
const std::vector<device_info> opencl_metainfo::get_devices() const {
return m_devices;
......@@ -214,5 +215,7 @@ opencl_metainfo* get_opencl_metainfo() {
return detail::singleton_manager::get_opencl_metainfo();
}
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
......@@ -39,7 +39,8 @@
using namespace std;
namespace cppa { namespace opencl {
namespace cppa {
namespace opencl {
program::program(context_ptr context, command_queue_ptr queue, program_ptr program)
......@@ -88,4 +89,6 @@ program program::create(const char* kernel_source, const char* options, uint32_t
return {context, devices[device_id].m_cmd_queue, pptr};
}
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment