12#include "sanisizer/sanisizer.hpp"
120template<
typename LeftValue_,
typename LeftIndex_,
typename RightValue_,
typename RightIndex_,
typename Output_>
124 Output_*
const output,
125 const bool output_row_major,
129 if (sanisizer::is_less_than(left.
nrow(), right.
ncol())) {
132 if (tleft->is_sparse()) {
154 bool prefer_larger =
true;
155 bool column_major_output =
true;
159template<
typename Value_,
typename Index_,
typename Right_,
typename Output_>
166 MultiplyWithSingleVectorOptions mopt;
174template<
typename Left_,
typename Value_,
typename Index_,
typename Output_>
181 MultiplyWithSingleVectorOptions mopt;
189template<
typename Value_,
typename Index_,
typename Right_,
typename Output_>
190void multiply(
const tatami::Matrix<Value_, Index_>& left,
const std::vector<Right_*>& right,
const std::vector<Output_*>& output,
const Options& opt) {
196 MultiplyWithMultipleVectorsOptions mopt;
204template<
typename Left_,
typename Value_,
typename Index_,
typename Output_>
205void multiply(
const std::vector<Left_*>& left,
const tatami::Matrix<Value_, Index_>& right,
const std::vector<Output_*>& output,
const Options& opt) {
211 MultiplyWithMultipleVectorsOptions mopt;
219template<
typename LeftValue_,
typename LeftIndex_,
typename RightValue_,
typename RightIndex_,
typename Output_>
225 !opt.column_major_output,
227 MultiplyWithMatrixOptions mopt;
228 set_num_threads(mopt, opt.num_threads);
229 mopt.larger_left = opt.prefer_larger;
virtual Index_ ncol() const=0
virtual Index_ nrow() const=0
virtual bool is_sparse() const=0
Any matrix LHS, dense matrix RHS.
Any matrix LHS, multiple vectors RHS.
Multiplication of tatami matrices.
Definition column_to_column.hpp:19
void multiply_with_multiple_vectors(const tatami::Matrix< Value_, Index_ > &left, const std::vector< Right_ * > &right, const std::vector< Output_ * > &output, const MultiplyWithMultipleVectorsOptions &options)
Definition dispatch.hpp:114
void set_dense_primary_block_size(MultiplyDenseColumnWithDenseMatrixOptions &options, int primary_block_size)
Definition dispatch.hpp:68
void multiply_with_matrix(const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyWithMatrixOptions &options)
Definition tatami_mult.hpp:121
void set_dense_secondary_block_size(MultiplyDenseColumnWithDenseMatrixOptions &options, int secondary_block_size)
Definition dispatch.hpp:83
void multiply_with_sparse_matrix(const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyWithSparseMatrixOptions &options)
Definition dispatch.hpp:97
void multiply_with_dense_matrix(const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyWithDenseMatrixOptions &options)
Definition dispatch.hpp:121
void multiply_with_single_vector(const tatami::Matrix< Value_, Index_ > &left, const Right_ *const right, Output_ *const output, const MultiplyWithSingleVectorOptions &options)
Definition dispatch.hpp:77
void set_sparse_block_size(MultiplyWithDenseMatrixOptions &options, int block_size)
Definition dispatch.hpp:87
void set_num_threads(MultiplyDenseColumnWithDenseMatrixOptions &options, int num_threads)
Definition dispatch.hpp:54
std::shared_ptr< const Matrix< Value_, Index_ > > wrap_shared_ptr(const Matrix< Value_, Index_ > *const ptr)
Any matrix LHS, single vector RHS.
Any matrix LHS, sparse matrix RHS.
Options for multiply_with_dense_matrix().
Definition dispatch.hpp:19
Options for multiply_with_matrix().
Definition tatami_mult.hpp:28
MultiplyWithSparseMatrixOptions sparse_matrix
Definition tatami_mult.hpp:37
MultiplyWithDenseMatrixOptions dense_matrix
Definition tatami_mult.hpp:32
bool larger_left
Definition tatami_mult.hpp:47
Options for multiply_with_sparse_matrix().
Definition dispatch.hpp:19