Commit e12d8fd5 authored by Marian Triebe's avatar Marian Triebe

Merge branch 'master' into topic/opencl

parents f6e0c416 99a6370c
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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 {
......@@ -157,6 +158,7 @@ class command : public ref_counted {
}
};
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_COMMAND_HPP
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -29,14 +29,15 @@
\******************************************************************************/
#ifndef DEVICE_INFO_HPP
#define DEVICE_INFO_HPP
#ifndef CPPA_OPENCL_DEVICE_INFO_HPP
#define CPPA_OPENCL_DEVICE_INFO_HPP
#include "cppa/opencl/global.hpp"
#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
#endif // CPPA_OPENCL_DEVICE_INFO_HPP
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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,7 @@ 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
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -29,8 +29,8 @@
\******************************************************************************/
#ifndef OPENCL_METAINFO_HPP
#define OPENCL_METAINFO_HPP
#ifndef CPPA_OPENCL_METAINFO_HPP
#define CPPA_OPENCL_METAINFO_HPP
#include <atomic>
#include <vector>
......@@ -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,7 @@ class opencl_metainfo {
opencl_metainfo* get_opencl_metainfo();
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // OPENCL_METAINFO_HPP
#endif // CPPA_OPENCL_METAINFO_HPP
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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,7 @@ class program {
};
} } // namespace cppa::opencl
} // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_PROGRAM_HPP
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -29,14 +29,15 @@
\******************************************************************************/
#ifndef SMART_PTR_HPP
#define SMART_PTR_HPP
#ifndef CPPA_OPENCL_SMART_PTR_HPP
#define CPPA_OPENCL_SMART_PTR_HPP
#include <memory>
#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,7 @@ 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
#endif // CPPA_OPENCL_SMART_PTR_HPP
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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
......@@ -9,7 +9,7 @@
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Copyright (C) 2011-2014 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* Raphael Hiesgen <raphael.hiesgen@haw-hamburg.de> *
* *
......@@ -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)
......@@ -118,4 +119,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