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

Enforce coding conventions for namespaces

parent 37c4ed35
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
#include "cppa/util/scope_guard.hpp" #include "cppa/util/scope_guard.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename T, typename R> template<typename T, typename R>
class command : public ref_counted { class command : public ref_counted {
...@@ -157,6 +158,7 @@ class command : public ref_counted { ...@@ -157,6 +158,7 @@ class command : public ref_counted {
} }
}; };
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_COMMAND_HPP #endif // CPPA_OPENCL_COMMAND_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "cppa/opencl/program.hpp" #include "cppa/opencl/program.hpp"
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
class device_info { class device_info {
...@@ -84,7 +85,8 @@ inline dim_vec device_info::get_max_work_items_per_dim() { ...@@ -84,7 +85,8 @@ inline dim_vec device_info::get_max_work_items_per_dim() {
return m_max_work_items_per_dim; return m_max_work_items_per_dim;
} }
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // DEVICE_INFO_HPP #endif // DEVICE_INFO_HPP
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include <CL/opencl.h> #include <CL/opencl.h>
#endif #endif
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
/** /**
* @brief A vector of up to three elements used for OpenCL dimensions. * @brief A vector of up to three elements used for OpenCL dimensions.
...@@ -54,6 +55,8 @@ std::string get_opencl_error(cl_int err); ...@@ -54,6 +55,8 @@ std::string get_opencl_error(cl_int err);
cl_int clReleaseDeviceDummy (cl_device_id); cl_int clReleaseDeviceDummy (cl_device_id);
cl_int clRetainDeviceDummy (cl_device_id); cl_int clRetainDeviceDummy (cl_device_id);
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_GLOBAL_HPP #endif // CPPA_OPENCL_GLOBAL_HPP
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
#include "cppa/detail/singleton_mixin.hpp" #include "cppa/detail/singleton_mixin.hpp"
#include "cppa/detail/singleton_manager.hpp" #include "cppa/detail/singleton_manager.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
class opencl_metainfo { class opencl_metainfo {
...@@ -77,6 +78,8 @@ class opencl_metainfo { ...@@ -77,6 +78,8 @@ class opencl_metainfo {
opencl_metainfo* get_opencl_metainfo(); opencl_metainfo* get_opencl_metainfo();
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // OPENCL_METAINFO_HPP #endif // OPENCL_METAINFO_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/opencl/global.hpp" #include "cppa/opencl/global.hpp"
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename Signature> template<typename Signature>
class actor_facade; class actor_facade;
...@@ -69,6 +70,8 @@ class program { ...@@ -69,6 +70,8 @@ class program {
}; };
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_PROGRAM_HPP #endif // CPPA_OPENCL_PROGRAM_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include <algorithm> #include <algorithm>
#include <type_traits> #include <type_traits>
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)> template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)>
class smart_ptr { class smart_ptr {
...@@ -119,6 +120,8 @@ typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy> ...@@ -119,6 +120,8 @@ typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy>
typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue> typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue>
command_queue_ptr; command_queue_ptr;
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // SMART_PTR_HPP #endif // SMART_PTR_HPP
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
#include "cppa/opencl/global.hpp" #include "cppa/opencl/global.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
std::string get_opencl_error(cl_int err) { std::string get_opencl_error(cl_int err) {
switch (err) { switch (err) {
...@@ -135,4 +136,6 @@ std::string get_opencl_error(cl_int err) { ...@@ -135,4 +136,6 @@ std::string get_opencl_error(cl_int err) {
cl_int clReleaseDeviceDummy (cl_device_id) { return 0; } cl_int clReleaseDeviceDummy (cl_device_id) { return 0; }
cl_int clRetainDeviceDummy (cl_device_id) { return 0; } cl_int clRetainDeviceDummy (cl_device_id) { return 0; }
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
using namespace std; using namespace std;
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
const std::vector<device_info> opencl_metainfo::get_devices() const { const std::vector<device_info> opencl_metainfo::get_devices() const {
return m_devices; return m_devices;
...@@ -214,5 +215,7 @@ opencl_metainfo* get_opencl_metainfo() { ...@@ -214,5 +215,7 @@ opencl_metainfo* get_opencl_metainfo() {
return detail::singleton_manager::get_opencl_metainfo(); return detail::singleton_manager::get_opencl_metainfo();
} }
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
using namespace std; using namespace std;
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
program::program(context_ptr context, command_queue_ptr queue, program_ptr program) 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 ...@@ -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}; 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