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 {
size_t result_size) {
if (global_dims.empty()) {
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);
}
auto check_vec = [&](const dim_vec& vec, const char* name) {
......@@ -76,7 +76,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
std::ostringstream oss;
oss << name << " vector is not empty, but "
<< "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());
}
};
......@@ -88,7 +88,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
if (err != CL_SUCCESS) {
std::ostringstream oss;
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());
}
if (result_size == 0) {
......
......@@ -181,7 +181,7 @@ void multiplier(event_based_actor* self) {
int main() {
// matrix_type ist not a simple type,
// it must be annouced to libcaf
announce<matrix_type>();
announce<matrix_type>("matrix_type");
spawn(multiplier);
await_all_actors_done();
shutdown();
......
......@@ -105,7 +105,7 @@ void multiplier(event_based_actor* self) {
}
int main() {
announce<vector<float>>();
announce<vector<float>>("float_vector");
spawn(multiplier);
await_all_actors_done();
shutdown();
......
......@@ -48,7 +48,7 @@ program program::create(const char* kernel_source, const char* options,
oss << "Device id " << device_id
<< " 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());
}
......
......@@ -104,7 +104,7 @@ class square_matrix {
static constexpr size_t num_elements = Size * Size;
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;
......@@ -311,7 +311,7 @@ void test_opencl() {
int main() {
CAF_TEST(tkest_opencl);
announce<ivec>();
announce<ivec>("ivec");
matrix_type::announce();
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