Commit 78f4e19d authored by Dominik Charousset's avatar Dominik Charousset

Adopt to new signature of `announce`

parent 97ec8418
...@@ -68,7 +68,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor { ...@@ -68,7 +68,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
size_t result_size) { size_t result_size) {
if (global_dims.empty()) { if (global_dims.empty()) {
auto str = "OpenCL kernel needs at least 1 global dimension."; auto str = "OpenCL kernel needs at least 1 global dimension.";
CAF_LOGM_ERROR(detail::demangle(typeid(actor_facade)).c_str(), str); CAF_LOGM_ERROR("caf::opencl::actor_facade", str);
throw std::runtime_error(str); throw std::runtime_error(str);
} }
auto check_vec = [&](const dim_vec& vec, const char* name) { auto check_vec = [&](const dim_vec& vec, const char* name) {
...@@ -76,7 +76,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor { ...@@ -76,7 +76,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
std::ostringstream oss; std::ostringstream oss;
oss << name << " vector is not empty, but " oss << name << " vector is not empty, but "
<< "its size differs from global dimensions vector's size"; << "its size differs from global dimensions vector's size";
CAF_LOGM_ERROR(detail::demangle<actor_facade>().c_str(), oss.str()); CAF_LOGM_ERROR("caf::opencl::actor_facade", oss.str());
throw std::runtime_error(oss.str()); throw std::runtime_error(oss.str());
} }
}; };
...@@ -88,7 +88,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor { ...@@ -88,7 +88,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
if (err != CL_SUCCESS) { if (err != CL_SUCCESS) {
std::ostringstream oss; std::ostringstream oss;
oss << "clCreateKernel: " << get_opencl_error(err); oss << "clCreateKernel: " << get_opencl_error(err);
CAF_LOGM_ERROR(detail::demangle<actor_facade>().c_str(), oss.str()); CAF_LOGM_ERROR("caf::opencl::actor_facade", oss.str());
throw std::runtime_error(oss.str()); throw std::runtime_error(oss.str());
} }
if (result_size == 0) { if (result_size == 0) {
......
...@@ -181,7 +181,7 @@ void multiplier(event_based_actor* self) { ...@@ -181,7 +181,7 @@ void multiplier(event_based_actor* self) {
int main() { int main() {
// matrix_type ist not a simple type, // matrix_type ist not a simple type,
// it must be annouced to libcaf // it must be annouced to libcaf
announce<matrix_type>(); announce<matrix_type>("matrix_type");
spawn(multiplier); spawn(multiplier);
await_all_actors_done(); await_all_actors_done();
shutdown(); shutdown();
......
...@@ -105,7 +105,7 @@ void multiplier(event_based_actor* self) { ...@@ -105,7 +105,7 @@ void multiplier(event_based_actor* self) {
} }
int main() { int main() {
announce<vector<float>>(); announce<vector<float>>("float_vector");
spawn(multiplier); spawn(multiplier);
await_all_actors_done(); await_all_actors_done();
shutdown(); shutdown();
......
...@@ -48,7 +48,7 @@ program program::create(const char* kernel_source, const char* options, ...@@ -48,7 +48,7 @@ program program::create(const char* kernel_source, const char* options,
oss << "Device id " << device_id oss << "Device id " << device_id
<< " is not a vaild device. Maximum id is: " << (devices.size() - 1) << " is not a vaild device. Maximum id is: " << (devices.size() - 1)
<< "."; << ".";
CAF_LOGM_ERROR(detail::demangle<program>().c_str(), oss.str()); CAF_LOGM_ERROR("caf::opencl::program", oss.str());
throw runtime_error(oss.str()); throw runtime_error(oss.str());
} }
......
...@@ -104,7 +104,7 @@ class square_matrix { ...@@ -104,7 +104,7 @@ class square_matrix {
static constexpr size_t num_elements = Size * Size; static constexpr size_t num_elements = Size * Size;
static void announce() { static void announce() {
caf::announce<square_matrix>(&square_matrix::m_data); caf::announce<square_matrix>("square_matrix", &square_matrix::m_data);
} }
square_matrix(square_matrix&&) = default; square_matrix(square_matrix&&) = default;
...@@ -311,7 +311,7 @@ void test_opencl() { ...@@ -311,7 +311,7 @@ void test_opencl() {
int main() { int main() {
CAF_TEST(tkest_opencl); CAF_TEST(tkest_opencl);
announce<ivec>(); announce<ivec>("ivec");
matrix_type::announce(); matrix_type::announce();
test_opencl(); test_opencl();
......
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