Commit cb993316 authored by Dominik Charousset's avatar Dominik Charousset

remodeled handling of sync. responses

parent ac4f96fb
...@@ -139,7 +139,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor { ...@@ -139,7 +139,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
util::int_list<Is...>) { util::int_list<Is...>) {
auto opt = m_map_args(std::move(msg)); auto opt = m_map_args(std::move(msg));
if (opt) { if (opt) {
response_handle handle{ this, sender, id.response_id() }; response_promise handle{ this, sender, id.response_id() };
size_t ret_size = std::accumulate(m_global_dimensions.begin(), size_t ret_size = std::accumulate(m_global_dimensions.begin(),
m_global_dimensions.end(), 1, m_global_dimensions.end(), 1,
std::multiplies<size_t>{}); std::multiplies<size_t>{});
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "cppa/logging.hpp" #include "cppa/logging.hpp"
#include "cppa/opencl/global.hpp" #include "cppa/opencl/global.hpp"
#include "cppa/abstract_actor.hpp" #include "cppa/abstract_actor.hpp"
#include "cppa/response_handle.hpp" #include "cppa/response_promise.hpp"
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
#include "cppa/util/scope_guard.hpp" #include "cppa/util/scope_guard.hpp"
...@@ -51,7 +51,7 @@ class command : public ref_counted { ...@@ -51,7 +51,7 @@ class command : public ref_counted {
public: public:
command(response_handle handle, command(response_promise handle,
intrusive_ptr<T> actor_facade, intrusive_ptr<T> actor_facade,
std::vector<mem_ptr> arguments) std::vector<mem_ptr> arguments)
: m_number_of_values(std::accumulate(actor_facade->m_global_dimensions.begin(), : m_number_of_values(std::accumulate(actor_facade->m_global_dimensions.begin(),
...@@ -107,7 +107,7 @@ class command : public ref_counted { ...@@ -107,7 +107,7 @@ class command : public ref_counted {
private: private:
int m_number_of_values; int m_number_of_values;
response_handle m_handle; response_promise m_handle;
intrusive_ptr<T> m_actor_facade; intrusive_ptr<T> m_actor_facade;
event_ptr m_kernel_event; event_ptr m_kernel_event;
command_queue_ptr m_queue; command_queue_ptr m_queue;
......
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