67 Output_*
const output,
70 const auto left_NR = left.
nrow();
71 const auto common_dim = left.
ncol();
72 const auto right_NC = right.
ncol();
77 populate_sparse_buffers(
false, right_NC, common_dim, right, right_vbuffers, right_ibuffers, right_ranges, options.
num_threads);
84 for (LeftIndex_ lr = 0; lr < length; ++lr) {
85 const auto lptr = ext->fetch(dbuffer.data());
89 for (RightIndex_ rc = 0; rc < right_NC; ++rc) {
90 const auto rrange = right_ranges[rc];
91 output[sanisizer::nd_offset<std::size_t>(rc, right_NC, start + lr)] = sparse_dot_product<accumulators_>(
96 static_cast<Output_
>(0)
106 const LeftIndex_ max_block_rows = sanisizer::min(length, options.
block_size);
107 std::vector<std::vector<LeftValue_> > lbuffers;
108 lbuffers.reserve(max_block_rows);
109 for (LeftIndex_ b = 0; b < max_block_rows; ++b) {
115 while (lr < length) {
116 const LeftIndex_ lr_num = sanisizer::min(options.
block_size, length - lr);
117 for (LeftIndex_ lr_counter = 0; lr_counter < lr_num; ++lr_counter) {
118 lptrs[lr_counter] = ext->fetch(lbuffers[lr_counter].data());
124 for (RightIndex_ rc = 0; rc < right_NC; ++rc) {
125 const auto rrange = right_ranges[rc];
126 if (rrange.number == 0) {
127 for (LeftIndex_ lr_counter = 0; lr_counter < lr_num; ++lr_counter) {
128 output[sanisizer::nd_offset<std::size_t>(rc, right_NC, start + lr + lr_counter)] = 0;
133 for (LeftIndex_ lr_counter = 0; lr_counter < lr_num; ++lr_counter) {
134 output[sanisizer::nd_offset<std::size_t>(rc, right_NC, start + lr + lr_counter)] = sparse_dot_product<accumulators_>(
139 static_cast<Output_
>(0)
void multiply_dense_row_with_sparse_column_matrix_to_row_output(const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithSparseColumnMatrixToRowOutputOptions &options)
Definition column_to_row.hpp:64
auto consecutive_extractor(const Matrix< Value_, Index_ > &matrix, const bool row, const Index_ iter_start, const Index_ iter_length, Args_ &&... args)