28 #ifndef SPLA_CL_M_REDUCE_HPP
29 #define SPLA_CL_M_REDUCE_HPP
57 return "parallel matrix reduction on opencl device";
61 auto t = ctx.
task.template cast_safe<ScheduleTask_m_reduce>();
65 return execute_csr(ctx);
68 return execute_csr(ctx);
71 return execute_csr(ctx);
78 auto t = ctx.
task.template cast_safe<ScheduleTask_m_reduce>();
80 auto r = t->r.template cast_safe<TScalar<T>>();
81 auto s = t->s.template cast_safe<TScalar<T>>();
82 auto M = t->M.template cast_safe<TMatrix<T>>();
83 auto op_reduce = t->op_reduce.template cast_safe<TOpBinary<T, T, T>>();
87 const auto* p_cl_csr = M->template get<CLCsr<T>>();
88 auto* p_cl_acc = get_acc_cl();
89 auto& queue = p_cl_acc->get_queue_default();
91 cl_reduce<T>(queue, p_cl_csr->Ax, p_cl_csr->values, s->get_value(), op_reduce, r->get_value());
Status of library operation execution.
Definition: cl_m_reduce.hpp:48
std::string get_description() override
Definition: cl_m_reduce.hpp:56
~Algo_m_reduce_cl() override=default
std::string get_name() override
Definition: cl_m_reduce.hpp:52
Status execute(const DispatchContext &ctx) override
Definition: cl_m_reduce.hpp:60
Algorithm suitable to process schedule task based on task string key.
Definition: registry.hpp:66
Automates reference counting and behaves as shared smart pointer.
Definition: ref.hpp:117
Definition: algorithm.hpp:37
Execution context of a single task.
Definition: dispatcher.hpp:46
ref_ptr< ScheduleTask > task
Definition: dispatcher.hpp:48
#define TIME_PROFILE_SCOPE(name)
Definition: time_profiler.hpp:92