58 Output_*
const output,
61 const auto left_NR = left.
nrow();
62 const auto common_dim = left.
ncol();
63 const auto right_NC = right.
ncol();
68 populate_sparse_buffers(
true, common_dim, right_NC, right, right_vbuffers, right_ibuffers, right_ranges, options.
num_threads);
72 std::fill_n(output, sanisizer::product_unsafe<std::size_t>(left_NR, right_NC), 0);
80 std::optional<std::vector<Output_> > tmp_row;
85 for (LeftIndex_ lr = 0; lr < length; ++lr) {
86 const auto lrange = ext->fetch(vbuffer.data(), ibuffer.data());
87 const auto optr = output + sanisizer::product_unsafe<std::size_t>(start + lr, right_NC);
88 const auto tmp_optr = (do_parallel ? tmp_row->data() : optr);
90 for (LeftIndex_ x = 0; x < lrange.number; ++x) {
91 const auto rrange = right_ranges[lrange.index[x]];
92 const Output_ mult = lrange.value[x];
93 for (RightIndex_ y = 0; y < rrange.number; ++y) {
94 tmp_optr[rrange.index[y]] += mult *
static_cast<Output_
>(rrange.value[y]);
99 std::copy_n(tmp_optr, right_NC, optr);
106 std::fill_n(tmp_optr, right_NC, 0);
void multiply_sparse_row_with_sparse_row_matrix_to_row_output(const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithSparseRowMatrixToRowOutputOptions &options)
Definition row_to_row.hpp:55
auto consecutive_extractor(const Matrix< Value_, Index_ > &matrix, const bool row, const Index_ iter_start, const Index_ iter_length, Args_ &&... args)