52 return "sequential element-wise mult matrix operation";
56 auto t = ctx.
task.template cast_safe<ScheduleTask_m_emult>();
61 return execute_lil(ctx);
64 return execute_lil(ctx);
71 auto t = ctx.
task.template cast_safe<ScheduleTask_m_emult>();
81 auto* p_R = R->template get<CpuLil<T>>();
82 const auto* p_A = A->template get<CpuLil<T>>();
83 const auto* p_B = B->template get<CpuLil<T>>();
84 const auto& function = op->function;
86 const uint N = R->get_n_rows();
87 const auto fill_value_R = R->get_fill_value();
91 for (
uint i = 0; i < N; i++) {
92 auto& row_R = p_R->Ar[i];
93 const auto& row_A = p_A->Ar[i];
94 const auto& row_B = p_B->Ar[i];
96 auto iter_A = row_A.begin();
97 auto iter_B = row_B.begin();
99 auto end_A = row_A.end();
100 auto end_B = row_B.end();
102 while (iter_A != end_A && iter_B != end_B) {
103 const auto [i_A, x_A] = *iter_A;
104 const auto [i_B, x_B] = *iter_B;
108 }
else if (i_B < i_A) {
111 const T r = function(x_A, x_B);
113 if (r != fill_value_R) {
114 row_R.emplace_back(i_A, r);
Execution context of a single task.
Definition dispatcher.hpp:46
ref_ptr< ScheduleTask > task
Definition dispatcher.hpp:48