tatami_mult
Multiply tatami matrices
Loading...
Searching...
No Matches
tatami_mult Namespace Reference

Multiplication of tatami matrices. More...

Classes

struct  MultiplyDenseColumnWithDenseColumnMatrixToColumnOutputOptions
 Options for multiply_dense_column_with_dense_column_matrix_to_column_output(). More...
 
struct  MultiplyDenseColumnWithDenseColumnMatrixToRowOutputOptions
 Options for multiply_dense_column_with_dense_column_matrix_to_row_output(). More...
 
struct  MultiplyDenseColumnWithDenseMatrixOptions
 Options for multiply_dense_column_with_dense_matrix(). More...
 
struct  MultiplyDenseColumnWithDenseRowMatrixToColumnOutputOptions
 Options for multiply_dense_column_with_dense_row_matrix_to_column_output(). More...
 
struct  MultiplyDenseColumnWithDenseRowMatrixToRowOutputOptions
 Options for multiply_dense_column_with_dense_row_matrix_to_row_output(). More...
 
struct  MultiplyDenseColumnWithMultipleVectorsOptions
 Options for multiply_dense_column_with_multiple_vectors(). More...
 
struct  MultiplyDenseColumnWithSingleVectorOptions
 Options for multiply_dense_column_with_single_vector(). More...
 
struct  MultiplyDenseColumnWithSparseColumnMatrixToColumnOutputOptions
 Options for multiply_dense_column_with_sparse_column_matrix_to_column_output(). More...
 
struct  MultiplyDenseColumnWithSparseColumnMatrixToRowOutputOptions
 Options for multiply_dense_column_with_sparse_column_matrix_to_row_output(). More...
 
struct  MultiplyDenseColumnWithSparseMatrixOptions
 Options for multiply_dense_column_with_sparse_matrix(). More...
 
struct  MultiplyDenseColumnWithSparseRowMatrixToColumnOutputOptions
 Options for multiply_dense_column_with_sparse_row_matrix_to_column_output(). More...
 
struct  MultiplyDenseColumnWithSparseRowMatrixToRowOutputOptions
 Options for multiply_dense_column_with_sparse_row_matrix_to_row_output(). More...
 
struct  MultiplyDenseRowWithDenseColumnMatrixToColumnOutputOptions
 Options for multiply_dense_row_with_dense_column_matrix_to_column_output(). More...
 
struct  MultiplyDenseRowWithDenseColumnMatrixToRowOutputOptions
 Options for multiply_dense_row_with_dense_column_matrix_to_row_output(). More...
 
struct  MultiplyDenseRowWithDenseMatrixOptions
 Options for multiply_dense_row_with_dense_matrix(). More...
 
struct  MultiplyDenseRowWithDenseRowMatrixToColumnOutputOptions
 Options for multiply_dense_row_with_dense_row_matrix_to_column_output(). More...
 
struct  MultiplyDenseRowWithDenseRowMatrixToRowOutputOptions
 Options for multiply_dense_row_with_dense_row_matrix_to_row_output(). More...
 
struct  MultiplyDenseRowWithMultipleVectorsOptions
 Options for multiply_dense_row_with_multiple_vectors(). More...
 
struct  MultiplyDenseRowWithSingleVectorOptions
 Options for multiply_dense_row_with_single_vector(). More...
 
struct  MultiplyDenseRowWithSparseColumnMatrixToColumnOutputOptions
 Options for multiply_dense_row_with_sparse_column_matrix_to_column_output(). More...
 
struct  MultiplyDenseRowWithSparseColumnMatrixToRowOutputOptions
 Options for multiply_dense_row_with_sparse_column_matrix_to_row_output(). More...
 
struct  MultiplyDenseRowWithSparseMatrixOptions
 Options for multiply_dense_row_with_sparse_matrix(). More...
 
struct  MultiplyDenseRowWithSparseRowMatrixToColumnOutputOptions
 Options for multiply_dense_row_with_sparse_row_matrix_to_column_output(). More...
 
struct  MultiplyDenseRowWithSparseRowMatrixToRowOutputOptions
 Options for multiply_dense_row_with_sparse_row_matrix_to_row_output(). More...
 
struct  MultiplySparseColumnWithDenseColumnMatrixToColumnOutputOptions
 Options for multiply_sparse_column_with_dense_column_matrix_to_column_output(). More...
 
struct  MultiplySparseColumnWithDenseColumnMatrixToRowOutputOptions
 Options for multiply_sparse_column_with_dense_column_matrix_to_row_output(). More...
 
struct  MultiplySparseColumnWithDenseMatrixOptions
 Options for multiply_sparse_column_with_dense_matrix(). More...
 
struct  MultiplySparseColumnWithDenseRowMatrixToColumnOutputOptions
 Options for multiply_sparse_column_with_dense_row_matrix_to_column_output(). More...
 
struct  MultiplySparseColumnWithDenseRowMatrixToRowOutputOptions
 Options for multiply_sparse_column_with_dense_row_matrix_to_row_output(). More...
 
struct  MultiplySparseColumnWithMultipleVectorsOptions
 Options for multiply_sparse_column_with_multiple_vectors(). More...
 
struct  MultiplySparseColumnWithSingleVectorOptions
 Options for multiply_sparse_column_with_single_vector(). More...
 
struct  MultiplySparseColumnWithSparseColumnMatrixToColumnOutputOptions
 Options for multiply_sparse_column_with_sparse_column_matrix_to_column_output(). More...
 
struct  MultiplySparseColumnWithSparseColumnMatrixToRowOutputOptions
 Options for multiply_sparse_column_with_sparse_column_matrix_to_row_output(). More...
 
struct  MultiplySparseColumnWithSparseMatrixOptions
 Options for multiply_sparse_column_with_sparse_matrix(). More...
 
struct  MultiplySparseColumnWithSparseRowMatrixToColumnOutputOptions
 Options for multiply_sparse_column_with_sparse_row_matrix_to_column_output(). More...
 
struct  MultiplySparseColumnWithSparseRowMatrixToRowOutputOptions
 Options for multiply_sparse_column_with_sparse_row_matrix_to_row_output(). More...
 
struct  MultiplySparseRowWithDenseColumnMatrixToColumnOutputOptions
 Options for multiply_sparse_row_with_dense_column_matrix_to_column_output(). More...
 
struct  MultiplySparseRowWithDenseColumnMatrixToRowOutputOptions
 Options for multiply_sparse_row_with_dense_column_matrix_to_row_output(). More...
 
struct  MultiplySparseRowWithDenseMatrixOptions
 Options for multiply_sparse_row_with_dense_matrix(). More...
 
struct  MultiplySparseRowWithDenseRowMatrixToColumnOutputOptions
 Options for multiply_sparse_row_with_dense_row_matrix_to_column_output(). More...
 
struct  MultiplySparseRowWithDenseRowMatrixToRowOutputOptions
 Options for multiply_sparse_row_with_dense_row_matrix_to_row_output(). More...
 
struct  MultiplySparseRowWithMultipleVectorsOptions
 Options for multiply_sparse_row_with_multiple_vectors(). More...
 
struct  MultiplySparseRowWithSingleVectorOptions
 Options for multiply_sparse_row_with_single_vector(). More...
 
struct  MultiplySparseRowWithSparseColumnMatrixToColumnOutputOptions
 Options for multiply_sparse_row_with_sparse_column_matrix_to_column_output(). More...
 
struct  MultiplySparseRowWithSparseColumnMatrixToRowOutputOptions
 Options for multiply_sparse_row_with_sparse_column_matrix_to_row_output(). More...
 
struct  MultiplySparseRowWithSparseMatrixOptions
 Options for multiply_sparse_row_with_sparse_matrix(). More...
 
struct  MultiplySparseRowWithSparseRowMatrixToColumnOutputOptions
 Options for multiply_sparse_row_with_sparse_row_matrix_to_column_output(). More...
 
struct  MultiplySparseRowWithSparseRowMatrixToRowOutputOptions
 Options for multiply_sparse_row_with_sparse_row_matrix_to_row_output(). More...
 
struct  MultiplyWithDenseMatrixOptions
 Options for multiply_with_dense_matrix(). More...
 
struct  MultiplyWithMatrixOptions
 Options for multiply_with_matrix(). More...
 
struct  MultiplyWithMultipleVectorsOptions
 Options for multiply_with_multiple_vectors(). More...
 
struct  MultiplyWithSingleVectorOptions
 Options for multiply_with_single_vector(). More...
 
struct  MultiplyWithSparseMatrixOptions
 Options for multiply_with_sparse_matrix(). More...
 

Functions

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_dense_column_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplyDenseColumnWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_dense_column_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplyDenseColumnWithDenseColumnMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithDenseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplyDenseColumnWithDenseMatrixOptions &options, int num_threads)
 
void set_dense_primary_block_size (MultiplyDenseColumnWithDenseMatrixOptions &options, int primary_block_size)
 
void set_dense_secondary_block_size (MultiplyDenseColumnWithDenseMatrixOptions &options, int secondary_block_size)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_dense_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyDenseColumnWithDenseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void multiply_dense_column_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplyDenseColumnWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void multiply_dense_column_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplyDenseColumnWithDenseRowMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithDenseRowMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_dense_row_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplyDenseRowWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightColumn_ , typename Output_ >
void multiply_dense_row_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplyDenseRowWithDenseColumnMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithDenseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplyDenseRowWithDenseMatrixOptions &options, int num_threads)
 
void set_dense_primary_block_size (MultiplyDenseRowWithDenseMatrixOptions &options, int primary_block_size)
 
void set_dense_secondary_block_size (MultiplyDenseRowWithDenseMatrixOptions &options, int secondary_block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_dense_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyDenseRowWithDenseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void multiply_dense_row_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplyDenseRowWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void multiply_dense_row_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplyDenseRowWithDenseRowMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithDenseRowMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplyWithDenseMatrixOptions &options, int num_threads)
 
void set_dense_primary_block_size (MultiplyWithDenseMatrixOptions &options, int primary_block_size)
 
void set_dense_secondary_block_size (MultiplyWithDenseMatrixOptions &options, int secondary_block_size)
 
void set_sparse_block_size (MultiplyWithDenseMatrixOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
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)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_sparse_column_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplySparseColumnWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_sparse_column_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplySparseColumnWithDenseColumnMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithDenseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplySparseColumnWithDenseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplySparseColumnWithDenseMatrixOptions &options, int block_size)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_dense_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplySparseColumnWithDenseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void multiply_sparse_column_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplySparseColumnWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void multiply_sparse_column_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplySparseColumnWithDenseRowMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithDenseRowMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_sparse_row_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplySparseRowWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_dense_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithDenseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void multiply_sparse_row_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightColumn_ get_right_column, Output_ *const output, const MultiplySparseRowWithDenseColumnMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_dense_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithDenseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplySparseRowWithDenseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplySparseRowWithDenseMatrixOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_dense_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplySparseRowWithDenseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void multiply_sparse_row_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplySparseRowWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_dense_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithDenseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void multiply_sparse_row_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightColumns_ right_columns, GetRightRow_ get_right_row, Output_ *const output, const MultiplySparseRowWithDenseRowMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_dense_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithDenseRowMatrixToRowOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutput_ >
void multiply_dense_column_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightVectors_ right_vectors, GetRightVector_ get_right_vector, GetOutput_ get_output_vector, const MultiplyDenseColumnWithMultipleVectorsOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_dense_column_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const std::vector< RightValue_ * > &right, const std::vector< Output_ * > &output, const MultiplyDenseColumnWithMultipleVectorsOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void multiply_dense_row_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightVectors_ right_vectors, GetRightVector_ get_right_vector, GetOutputVector_ get_output_vector, const MultiplyDenseRowWithMultipleVectorsOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_dense_row_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const std::vector< RightValue_ * > &right, const std::vector< Output_ * > &output, const MultiplyDenseRowWithMultipleVectorsOptions &options)
 
void set_num_threads (MultiplyWithMultipleVectorsOptions &options, int num_threads)
 
void set_dense_primary_block_size (MultiplyWithMultipleVectorsOptions &options, int primary_block_size)
 
void set_dense_secondary_block_size (MultiplyWithMultipleVectorsOptions &options, int secondary_block_size)
 
void set_sparse_block_size (MultiplyWithMultipleVectorsOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename Value_ , typename Index_ , typename Right_ , typename Output_ >
void multiply_with_multiple_vectors (const tatami::Matrix< Value_, Index_ > &left, const std::vector< Right_ * > &right, const std::vector< Output_ * > &output, const MultiplyWithMultipleVectorsOptions &options)
 
template<std::size_t accumulators_ = 4, typename Left_ , typename Value_ , typename Index_ , typename Output_ >
void multiply_with_multiple_vectors (const std::vector< Left_ * > &left, const tatami::Matrix< Value_, Index_ > &right, const std::vector< Output_ * > &output, const MultiplyWithMultipleVectorsOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void multiply_sparse_column_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightVectors_ right_vectors, GetRightVector_ get_right_vector, GetOutputVector_ get_output_vector, const MultiplySparseColumnWithMultipleVectorsOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_sparse_column_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const std::vector< RightValue_ * > &right, const std::vector< Output_ * > &output, const MultiplySparseColumnWithMultipleVectorsOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void multiply_sparse_row_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightVectors_ right_vectors, GetRightVector_ get_right_vector, GetOutputVector_ get_output_vector, const MultiplySparseRowWithMultipleVectorsOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_sparse_row_with_multiple_vectors (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const std::vector< RightValue_ * > &right, const std::vector< Output_ * > &output, const MultiplySparseRowWithMultipleVectorsOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_dense_column_with_single_vector (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightValue_ *const right, Output_ *const output, const MultiplyDenseColumnWithSingleVectorOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_dense_row_with_single_vector (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightValue_ *const right, Output_ *const output, const MultiplyDenseRowWithSingleVectorOptions &options)
 
void set_num_threads (MultiplyWithSingleVectorOptions &options, int num_threads)
 
template<std::size_t accumulators_ = 4, typename Value_ , typename Index_ , typename Right_ , typename Output_ >
void multiply_with_single_vector (const tatami::Matrix< Value_, Index_ > &left, const Right_ *const right, Output_ *const output, const MultiplyWithSingleVectorOptions &options)
 
template<std::size_t accumulators_ = 4, typename Left_ , typename Value_ , typename Index_ , typename Output_ >
void multiply_with_single_vector (const Left_ *const left, const tatami::Matrix< Value_, Index_ > &right, Output_ *const output, const MultiplyWithSingleVectorOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_sparse_column_with_single_vector (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightValue_ *const right, Output_ *const output, const MultiplySparseColumnWithSingleVectorOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void multiply_sparse_row_with_single_vector (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const RightValue_ *const right, Output_ *const output, const MultiplySparseRowWithSingleVectorOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_sparse_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithSparseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_sparse_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithSparseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplyDenseColumnWithSparseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplyDenseColumnWithSparseMatrixOptions &options, int block_size)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_sparse_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyDenseColumnWithSparseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_sparse_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithSparseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_column_with_sparse_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseColumnWithSparseRowMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_sparse_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithSparseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
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)
 
void set_num_threads (MultiplyDenseRowWithSparseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplyDenseRowWithSparseMatrixOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_sparse_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplyDenseRowWithSparseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_sparse_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithSparseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_dense_row_with_sparse_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplyDenseRowWithSparseRowMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplyWithSparseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplyWithSparseMatrixOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
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)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_sparse_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithSparseColumnMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_sparse_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithSparseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplySparseColumnWithSparseMatrixOptions &options, int num_threads)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_sparse_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplySparseColumnWithSparseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_sparse_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithSparseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_column_with_sparse_row_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseColumnWithSparseRowMatrixToRowOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_sparse_column_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithSparseColumnMatrixToColumnOutputOptions &options)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_sparse_column_matrix_to_row_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithSparseColumnMatrixToRowOutputOptions &options)
 
void set_num_threads (MultiplySparseRowWithSparseMatrixOptions &options, int num_threads)
 
void set_sparse_block_size (MultiplySparseRowWithSparseMatrixOptions &options, int block_size)
 
template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_sparse_matrix (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const bool output_row_major, const MultiplySparseRowWithSparseMatrixOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void multiply_sparse_row_with_sparse_row_matrix_to_column_output (const tatami::Matrix< LeftValue_, LeftIndex_ > &left, const tatami::Matrix< RightValue_, RightIndex_ > &right, Output_ *const output, const MultiplySparseRowWithSparseRowMatrixToColumnOutputOptions &options)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
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)
 
void set_num_threads (MultiplyWithMatrixOptions &options, int num_threads)
 
void set_dense_primary_block_size (MultiplyWithMatrixOptions &options, int primary_block_size)
 
void set_dense_secondary_block_size (MultiplyWithMatrixOptions &options, int secondary_block_size)
 
void set_sparse_block_size (MultiplyWithMatrixOptions &options, int block_size)
 
template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
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)
 

Detailed Description

Multiplication of tatami matrices.

Function Documentation

◆ multiply_dense_column_with_dense_column_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplyDenseColumnWithDenseColumnMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in column-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_column_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithDenseColumnMatrixToColumnOutputOptions & options )

Overload of multiply_dense_column_with_dense_column_matrix_to_column_output() for a RHS tatami::Matrix. This will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this contains the product left * right in column-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_column_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplyDenseColumnWithDenseColumnMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in row-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_column_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithDenseColumnMatrixToRowOutputOptions & options )

Overload of multiply_dense_column_with_dense_column_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this contains the product left * right in row-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_matrix()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplyDenseColumnWithDenseMatrixOptions & options )

This function delegates to multiply_dense_column_with_dense_row_matrix_to_row_output(), multiply_dense_column_with_dense_row_matrix_to_column_output(), multiply_dense_column_with_dense_column_matrix_to_row_output(), or multiply_dense_column_with_dense_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for dense matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_dense_column_with_dense_row_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplyDenseColumnWithDenseRowMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in column-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_row_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithDenseRowMatrixToColumnOutputOptions & options )

Overload of multiply_dense_column_with_dense_row_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this contains the product left * right in column-major order.
optionsFurther options.

◆ multiply_dense_column_with_dense_row_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplyDenseColumnWithDenseRowMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a RightIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this contains the product left * right in row-major format.
optionsFurther options.

◆ multiply_dense_column_with_dense_row_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithDenseRowMatrixToRowOutputOptions & options )

Overload of multiply_dense_column_with_dense_row_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this contains the product left * right in row-major format.
optionsFurther options.

◆ multiply_dense_column_with_multiple_vectors() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutput_ >
void tatami_mult::multiply_dense_column_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightVectors_ right_vectors,
GetRightVector_ get_right_vector,
GetOutput_ get_output_vector,
const MultiplyDenseColumnWithMultipleVectorsOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightVectors_Integer type of the number of RHS vectors.
GetRightVector_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
GetOutput_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
right_vectorsNumber of RHS vectors.
get_right_vectorFunction that accepts a RightVectors_ in [0, num_right) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_vector(i) represents the i-th RHS vector with which to multiply left. This function should be thread-safe.
get_output_vectorFunction that accepts a RightVectors_ in [0, num_right) and returns a pointer to an array of length left.nrow(). On output, the array referenced by get_output_vector(i) stores the product of left with the i-th RHS vector.
optionsFurther options.

◆ multiply_dense_column_with_multiple_vectors() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const std::vector< RightValue_ * > & right,
const std::vector< Output_ * > & output,
const MultiplyDenseColumnWithMultipleVectorsOptions & options )

Overload of multiply_dense_column_with_multiple_vectors() that uses a vector of pointers to represent the RHS and output vectors.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vectors.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
[in]rightVector of pointers, each of which points to an array of length left.ncol(). Each entry contains an RHS vector with which to multiply left.
[out]outputVector of length equal to right.size(). Each entry is a pointer to an array of length left.nrow(). On output, the i-th entry stores the product left * right[i].
optionsFurther options.

◆ multiply_dense_column_with_single_vector()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_single_vector ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightValue_ *const right,
Output_ *const output,
const MultiplyDenseColumnWithSingleVectorOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vector.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
[in]rightPointer to an array of length equal to the number of columns of left, containing the RHS vector.
[out]outputPointer to an array of length equal to the number of rows of left. On output, this stores the product left * right.
optionsFurther options.

◆ multiply_dense_column_with_sparse_column_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_sparse_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithSparseColumnMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_column_with_sparse_column_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_sparse_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithSparseColumnMatrixToRowOutputOptions & options )

This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_dense_column_with_sparse_matrix()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_sparse_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplyDenseColumnWithSparseMatrixOptions & options )

This function delegates to multiply_dense_column_with_sparse_row_matrix_to_row_output(), multiply_dense_column_with_sparse_row_matrix_to_column_output(), multiply_dense_column_with_sparse_column_matrix_to_row_output(), or multiply_dense_column_with_sparse_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for sparse matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_dense_column_with_sparse_row_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_sparse_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithSparseRowMatrixToColumnOutputOptions & options )

This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_column_with_sparse_row_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_column_with_sparse_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseColumnWithSparseRowMatrixToRowOutputOptions & options )

This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_column_matrix_to_column_output() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplyDenseRowWithDenseColumnMatrixToColumnOutputOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_column_matrix_to_column_output() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithDenseColumnMatrixToColumnOutputOptions & options )

Overload of multiply_dense_row_with_dense_column_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_column_matrix_to_row_output() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplyDenseRowWithDenseColumnMatrixToRowOutputOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_column_matrix_to_row_output() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithDenseColumnMatrixToRowOutputOptions & options )

Overload of multiply_dense_row_with_dense_column_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplyDenseRowWithDenseMatrixOptions & options )

This function delegates to multiply_dense_row_with_dense_row_matrix_to_row_output(), multiply_dense_row_with_dense_row_matrix_to_column_output(), multiply_dense_row_with_dense_column_matrix_to_row_output(), or multiply_dense_row_with_dense_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for dense matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_dense_row_with_dense_row_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplyDenseRowWithDenseRowMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_row_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithDenseRowMatrixToColumnOutputOptions & options )

Overload of multiply_dense_row_with_dense_row_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_row_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplyDenseRowWithDenseRowMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_dense_row_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithDenseRowMatrixToRowOutputOptions & options )

Overload of multiply_dense_row_with_dense_row_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_multiple_vectors() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void tatami_mult::multiply_dense_row_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightVectors_ right_vectors,
GetRightVector_ get_right_vector,
GetOutputVector_ get_output_vector,
const MultiplyDenseRowWithMultipleVectorsOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightVectors_Integer type of the number of RHS vectors.
GetRightVector_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
GetOutputVector_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
right_vectorsNumber of RHS vectors.
get_right_vectorFunction that accepts a RightVectors_ in [0, right_vectors) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_vector(i) represents the i-th RHS vector with which to multiply left. This function should be thread-safe.
get_output_vectorFunction that accepts a RightVectors_ in [0, right_vectors) and returns a pointer to an array of length left.nrow(). On output, the array referenced by by get_output_vector(i) stores the product left * right[i]. This function should be thread-safe.
optionsFurther options.

◆ multiply_dense_row_with_multiple_vectors() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const std::vector< RightValue_ * > & right,
const std::vector< Output_ * > & output,
const MultiplyDenseRowWithMultipleVectorsOptions & options )

Overload of multiply_dense_row_with_multiple_vectors() that uses a vector of pointers to represent the RHS and output vectors.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vectors.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
[in]rightVector of pointers, each of which points to an array of length left.ncol(). Each entry contains an RHS vector with which to multiply left.
[out]outputVector of length equal to right.size(). Each entry is a pointer to an array of length left.nrow(). On output, the i-th entry stores the product left * right[i].
optionsFurther options.

◆ multiply_dense_row_with_single_vector()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_single_vector ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightValue_ *const right,
Output_ *const output,
const MultiplyDenseRowWithSingleVectorOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vector.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
[in]rightPointer to an array of length equal to the number of columns of left, containing the RHS vector.
[out]outputPointer to an array of length equal to the number of rows of left. On output, this stores the product left * right.
optionsFurther options.

◆ multiply_dense_row_with_sparse_column_matrix_to_column_output()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_sparse_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithSparseColumnMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_sparse_column_matrix_to_row_output()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::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 )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_dense_row_with_sparse_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_sparse_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplyDenseRowWithSparseMatrixOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product. see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for sparse matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_dense_row_with_sparse_row_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_sparse_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithSparseRowMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_dense_row_with_sparse_row_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_dense_row_with_sparse_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplyDenseRowWithSparseRowMatrixToRowOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_column_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplySparseColumnWithDenseColumnMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, this contains the product left * right in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_column_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithDenseColumnMatrixToColumnOutputOptions & options )

Overload of multiply_sparse_column_with_dense_column_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, this contains the product left * right in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_column_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplySparseColumnWithDenseColumnMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_column_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithDenseColumnMatrixToRowOutputOptions & options )

Overload of multiply_sparse_column_with_dense_column_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, this contains the product left * right in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_matrix()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplySparseColumnWithDenseMatrixOptions & options )

This function delegates to multiply_sparse_column_with_dense_row_matrix_to_row_output(), multiply_sparse_column_with_dense_row_matrix_to_column_output(), multiply_sparse_column_with_dense_column_matrix_to_row_output(), or multiply_sparse_column_with_dense_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for dense matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_sparse_column_with_dense_row_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplySparseColumnWithDenseRowMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_row_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithDenseRowMatrixToColumnOutputOptions & options )

Overload of multiply_sparse_column_with_dense_row_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, this contains the product left * right in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_row_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , typename GetRightRow_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplySparseColumnWithDenseRowMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this contains the matrix product in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_dense_row_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithDenseRowMatrixToRowOutputOptions & options )

Overload of multiply_sparse_column_with_dense_row_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in right should be equal to the number of columns in left.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, this contains the product left * right in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_multiple_vectors() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void tatami_mult::multiply_sparse_column_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightVectors_ right_vectors,
GetRightVector_ get_right_vector,
GetOutputVector_ get_output_vector,
const MultiplySparseColumnWithMultipleVectorsOptions & options )

Overload of multiply_sparse_column_with_multiple_vectors() that uses a vector of pointers to represent the RHS and output vectors.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightVectors_Integer type of the number of RHS vectors.
GetRightVector_Functor that accepts a RightIndex_ and returns a pointer to a numeric (typically floating-point) array.
GetOutputVector_Functor that accepts a RightIndex_ and returns a pointer to a numeric (typically floating-point) array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
right_vectorsNumber of RHS vectors.
get_right_vectorFunction that accepts a RightIndex_ in [0, right_vectors) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_vector(i) represents the i-th RHS vector with which to multiply left. This function should be thread-safe.
get_output_vectorFunction that accepts a RightIndex_ in [0, right_vectors) and returns a pointer to an array of length left.nrow(). On output, the array referenced by by get_output_vector(i) stores the product left * right[i].
optionsFurther options.

◆ multiply_sparse_column_with_multiple_vectors() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const std::vector< RightValue_ * > & right,
const std::vector< Output_ * > & output,
const MultiplySparseColumnWithMultipleVectorsOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vectors.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
[in]rightVector of pointers, each of which points to an array of length left.ncol(). Each entry contains an RHS vector with which to multiply left.
[out]outputVector of length equal to right.size(). Each entry is a pointer to an array of length left.nrow(). On output, the i-th entry stores the product left * right[i].
optionsFurther options.

◆ multiply_sparse_column_with_single_vector()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_single_vector ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightValue_ *const right,
Output_ *const output,
const MultiplySparseColumnWithSingleVectorOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vector.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
[in]rightPointer to an array of length equal to the number of columns of left, containing the RHS vector.
[out]outputPointer to an array of length equal to the number of rows of left. On output, this stores the product left * right.
optionsFurther options.

◆ multiply_sparse_column_with_sparse_column_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_sparse_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithSparseColumnMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_sparse_column_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_sparse_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithSparseColumnMatrixToRowOutputOptions & options )

This function will iterate over left, realizing columns into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_column_with_sparse_matrix()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_sparse_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplySparseColumnWithSparseMatrixOptions & options )

This function delegates to multiply_sparse_column_with_sparse_row_matrix_to_row_output(), multiply_sparse_column_with_sparse_row_matrix_to_column_output(), multiply_sparse_column_with_sparse_column_matrix_to_row_output(), or multiply_sparse_column_with_sparse_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for sparse matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_sparse_column_with_sparse_row_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_sparse_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithSparseRowMatrixToColumnOutputOptions & options )

This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_column_with_sparse_row_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_column_with_sparse_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseColumnWithSparseRowMatrixToRowOutputOptions & options )

This function will iterate over both left and right simultaneously, realizing columns and rows respectively into memory as needed.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_column_matrix_to_column_output() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplySparseRowWithDenseColumnMatrixToColumnOutputOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_column_matrix_to_column_output() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithDenseColumnMatrixToColumnOutputOptions & options )

Overload of multiply_sparse_row_with_dense_column_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_column_matrix_to_row_output() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightColumn_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightColumn_ get_right_column,
Output_ *const output,
const MultiplySparseRowWithDenseColumnMatrixToRowOutputOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightColumn_Functor that accepts a RightColumns_ and returns a pointer to an RHS column.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_columnFunction that accepts a RightColumns_ in [0, right_columns) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_column(i) represents the i-th column of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_column_matrix_to_row_output() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithDenseColumnMatrixToRowOutputOptions & options )

Overload of multiply_sparse_row_with_dense_column_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplySparseRowWithDenseMatrixOptions & options )

This function delegates to multiply_sparse_row_with_dense_row_matrix_to_row_output(), multiply_sparse_row_with_dense_row_matrix_to_column_output(), multiply_sparse_row_with_dense_column_matrix_to_row_output(), or multiply_sparse_row_with_dense_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for dense matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_sparse_row_with_dense_row_matrix_to_column_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplySparseRowWithDenseRowMatrixToColumnOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
RightValue_Numeric type of the RHS matrix value.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_row_matrix_to_column_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithDenseRowMatrixToColumnOutputOptions & options )

Overload of multiply_sparse_row_with_dense_row_matrix_to_column_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_row_matrix_to_row_output() [1/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightColumns_ , class GetRightRow_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightColumns_ right_columns,
GetRightRow_ get_right_row,
Output_ *const output,
const MultiplySparseRowWithDenseRowMatrixToRowOutputOptions & options )
Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightColumns_Integer type of the number of RHS columns.
GetRightRow_Functor that accepts a LeftIndex_ and returns a pointer to an RHS row.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
right_columnsNumber of columns of the RHS matrix to be multiplied.
get_right_rowFunction that accepts a LeftIndex_ in [0, left.ncol()) and returns a pointer to an array of length right_columns. The array referenced by get_right_row(i) represents the i-th row of the RHS matrix. This function should be thread-safe.
[out]outputPointer to an array of length equal to left.nrow() * right_columns. On output, this stores the matrix product in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_dense_row_matrix_to_row_output() [2/2]

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_dense_row_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithDenseRowMatrixToRowOutputOptions & options )

Overload of multiply_sparse_row_with_dense_row_matrix_to_row_output() for a RHS tatami::Matrix. This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for dense matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_multiple_vectors() [1/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightVectors_ , typename GetRightVector_ , typename GetOutputVector_ >
void tatami_mult::multiply_sparse_row_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightVectors_ right_vectors,
GetRightVector_ get_right_vector,
GetOutputVector_ get_output_vector,
const MultiplySparseRowWithMultipleVectorsOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightVectors_Integer type of the number of RHS vectors.
GetRightVector_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
GetOutputVector_Functor that accepts a RightVectors_ and returns a pointer to a numeric (typically floating-point) array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
right_vectorsNumber of RHS vectors.
get_right_vectorFunction that accepts a RightVectors_ in [0, right_vectors) and returns a pointer to an array of length left.ncol(). The array referenced by get_right_vector(i) represents the i-th RHS vector with which to multiply left. This function should be thread-safe.
get_output_vectorFunction that accepts a RightVectors_ in [0, right_vectors) and returns a pointer to an array of length left.nrow(). On output, the array referenced by by get_output_vector(i) stores the product left * right[i]. This function should be thread-safe.
optionsFurther options.

◆ multiply_sparse_row_with_multiple_vectors() [2/2]

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_multiple_vectors ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const std::vector< RightValue_ * > & right,
const std::vector< Output_ * > & output,
const MultiplySparseRowWithMultipleVectorsOptions & options )

Overload of multiply_sparse_row_with_multiple_vectors() that uses a vector of pointers to represent the RHS and output vectors.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vectors.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
[in]rightVector of pointers, each of which points to an array of length left.ncol(). Each entry contains an RHS vector with which to multiply left.
[out]outputVector of length equal to right.size(). Each entry is a pointer to an array of length left.nrow(). On output, the i-th entry stores the product left * right[i].
optionsFurther options.

◆ multiply_sparse_row_with_single_vector()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_single_vector ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const RightValue_ *const right,
Output_ *const output,
const MultiplySparseRowWithSingleVectorOptions & options )
Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS vector.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
[in]rightPointer to an array of length equal to the number of columns of left, containing the RHS vector.
[out]outputPointer to an array of length equal to the number of rows of left. On output, this stores the product left * right.
optionsFurther options.

◆ multiply_sparse_row_with_sparse_column_matrix_to_column_output()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_sparse_column_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithSparseColumnMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_sparse_column_matrix_to_row_output()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_sparse_column_matrix_to_row_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithSparseColumnMatrixToRowOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer column access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_sparse_row_with_sparse_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_sparse_matrix ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const bool output_row_major,
const MultiplySparseRowWithSparseMatrixOptions & options )

This function delegates to multiply_sparse_row_with_sparse_row_matrix_to_row_output(), multiply_sparse_row_with_sparse_row_matrix_to_column_output(), multiply_sparse_row_with_sparse_column_matrix_to_row_output(), or multiply_sparse_row_with_sparse_column_matrix_to_column_output(), depending on the properties of right and the choice of output_row_major.

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
accumulators_Number of accumulators for computing the dot product. see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for sparse matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_sparse_row_with_sparse_row_matrix_to_column_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::multiply_sparse_row_with_sparse_row_matrix_to_column_output ( const tatami::Matrix< LeftValue_, LeftIndex_ > & left,
const tatami::Matrix< RightValue_, RightIndex_ > & right,
Output_ *const output,
const MultiplySparseRowWithSparseRowMatrixToColumnOutputOptions & options )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in column-major format.
optionsFurther options.

◆ multiply_sparse_row_with_sparse_row_matrix_to_row_output()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::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 )

This function will iterate over left, realizing rows into memory as needed. It will also realize all of right into memory for fast repeated accesses.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices.
rightRHS matrix to be multiplied. This function is optimized for sparse matrices that prefer row access, but will work with all matrices. The number of rows in this matrix should be equal to the number of columns in left.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in row-major format.
optionsFurther options.

◆ multiply_with_dense_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::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 )

This function delegates to multiply_sparse_row_with_dense_matrix(), multiply_sparse_column_with_dense_matrix(), multiply_dense_row_with_dense_matrix(), or multiply_dense_column_with_dense_matrix(), depending on the properties of left.

This function will iterate over left, realizing rows/columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for dense matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_with_matrix()

template<typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::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 )

This function delegates to multiply_with_dense_matrix() or multiply_with_sparse_matrix(), depending on the properties of left, right and the choice of MultiplyWithMatrixOptions::larger_left.

This function will iterate over left, realizing rows/columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses. If MultiplyWithMatrixOptions::larger_left = true and right is larger, this function will iterate over right instead, and may realize left into memory.

depending on the choice of delegated function.

Template Parameters
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied.
rightRHS matrix to be multiplied. right.nrow() and left.ncol() should be equal.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ multiply_with_multiple_vectors() [1/2]

template<std::size_t accumulators_ = 4, typename Left_ , typename Value_ , typename Index_ , typename Output_ >
void tatami_mult::multiply_with_multiple_vectors ( const std::vector< Left_ * > & left,
const tatami::Matrix< Value_, Index_ > & right,
const std::vector< Output_ * > & output,
const MultiplyWithMultipleVectorsOptions & options )

Overload that wraps right in a tatami::DelayedTranspose and calls multiply_with_multiple_vectors().

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
Left_Numeric type of the LHS vectors.
Value_Numeric type of the RHS matrix value.
Index_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
[in]leftVector of pointers, each of which points to an array of length right.nrow(). Each entry contains a LHS vector with which to multiply right.
rightRHS matrix to be multiplied.
[out]outputPointer to an array of length equal to the number of columns of right. On output, the i-th entry stores the product t(left[i]) * right.
optionsFurther options.

◆ multiply_with_multiple_vectors() [2/2]

template<std::size_t accumulators_ = 4, typename Value_ , typename Index_ , typename Right_ , typename Output_ >
void tatami_mult::multiply_with_multiple_vectors ( const tatami::Matrix< Value_, Index_ > & left,
const std::vector< Right_ * > & right,
const std::vector< Output_ * > & output,
const MultiplyWithMultipleVectorsOptions & options )

This function delegates to multiply_sparse_row_with_multiple_vectors(), multiply_sparse_column_with_multiple_vectors(), multiply_dense_row_with_multiple_vectors(), or multiply_dense_column_with_multiple_vectors(), depending on the properties of left.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
Value_Numeric type of the LHS matrix value.
Index_Integer type of the LHS matrix index.
Right_Numeric type of the RHS vectors.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied.
[in]rightVector of pointers, each of which points to an array of length left.ncol(). Each entry contains a RHS vector with which to multiply left.
[out]outputVector of pointers, each of which points to an array of length left.nrow(). On output, the i-th entry stores the product left * right[i].
optionsFurther options.

◆ multiply_with_single_vector() [1/2]

template<std::size_t accumulators_ = 4, typename Left_ , typename Value_ , typename Index_ , typename Output_ >
void tatami_mult::multiply_with_single_vector ( const Left_ *const left,
const tatami::Matrix< Value_, Index_ > & right,
Output_ *const output,
const MultiplyWithSingleVectorOptions & options )

Overload that wraps right in a tatami::DelayedTranspose and calls multiply_with_single_vector().

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
Right_Numeric type of the LHS vector.
Value_Numeric type of the RHS matrix value.
Index_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
[in]leftPointer to an array of length equal to the number of rows of right, containing the LHS vector.
rightRHS matrix to be multiplied.
[out]outputPointer to an array of length equal to the number of columns of right. On output, this stores the product t(left) * right.
optionsFurther options.

◆ multiply_with_single_vector() [2/2]

template<std::size_t accumulators_ = 4, typename Value_ , typename Index_ , typename Right_ , typename Output_ >
void tatami_mult::multiply_with_single_vector ( const tatami::Matrix< Value_, Index_ > & left,
const Right_ *const right,
Output_ *const output,
const MultiplyWithSingleVectorOptions & options )

This function delegates to multiply_sparse_row_with_single_vector(), multiply_sparse_column_with_single_vector(), multiply_dense_row_with_single_vector(), or multiply_dense_column_with_single_vector(), depending on the properties of left.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
Value_Numeric type of the LHS matrix value.
Index_Integer type of the LHS matrix index.
Right_Numeric type of the RHS vector.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied.
[in]rightPointer to an array of length equal to the number of columns of left, containing the RHS vector.
[out]outputPointer to an array of length equal to the number of rows of left. On output, this stores the product left * right.
optionsFurther options.

◆ multiply_with_sparse_matrix()

template<std::size_t accumulators_ = 4, typename LeftValue_ , typename LeftIndex_ , typename RightValue_ , typename RightIndex_ , typename Output_ >
void tatami_mult::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 )

This function delegates to multiply_sparse_row_with_sparse_matrix(), multiply_sparse_column_with_sparse_matrix(), multiply_dense_row_with_sparse_matrix(), or multiply_dense_column_with_sparse_matrix(), depending on the properties of left.

This function will iterate over left, realizing rows/columns into memory as needed. It may either simultaneously iterate over right or realize all of right into memory for fast repeated accesses, depending on the choice of delegated function.

Template Parameters
accumulators_Number of accumulators for computing the dot product, see the Multiple accumulators section for more details.
LeftValue_Numeric type of the LHS matrix value.
LeftIndex_Integer type of the LHS matrix index.
RightValue_Numeric type of the RHS matrix value.
RightIndex_Integer type of the RHS matrix index.
Output_Numeric type of the output array.
Parameters
leftLHS matrix to be multiplied.
rightRHS matrix to be multiplied. The number of rows in this matrix should be equal to the number of columns in left. This function is optimized for sparse matrices, but will work with all matrices.
[out]outputPointer to an array of length equal to left.nrow() * right.ncol(). On output, this stores the product of left and right in either row- or column-major format depending on output_row_major.
output_row_majorWhether to store the matrix product in row-major format in output.
optionsFurther options.

◆ set_dense_primary_block_size() [1/5]

void tatami_mult::set_dense_primary_block_size ( MultiplyDenseColumnWithDenseMatrixOptions & options,
int primary_block_size )
inline

Set the primary block size to use in all multiplication functions involving a dense column-major LHS and a dense matrix RHS. See the \(B\) parameter in the Blocking for dense matrices section for more details.

Parameters
optionsOptions to be set.
primary_block_sizePrimary block size.

◆ set_dense_primary_block_size() [2/5]

void tatami_mult::set_dense_primary_block_size ( MultiplyDenseRowWithDenseMatrixOptions & options,
int primary_block_size )
inline

Set the primary block size to use in all multiplication functions involving a dense row-major LHS and a dense matrix RHS. See the \(B\) parameter in the Blocking for dense matrices section for more details.

Parameters
optionsOptions to be set.
primary_block_sizePrimary block size.

◆ set_dense_primary_block_size() [3/5]

void tatami_mult::set_dense_primary_block_size ( MultiplyWithDenseMatrixOptions & options,
int primary_block_size )
inline

Set the primary block size to use in all multiplication functions involving a dense matrix LHS and a dense matrix RHS. See the \(B\) parameter in the Blocking for dense matrices section for more details.

Parameters
optionsOptions to be set.
primary_block_sizePrimary block size.

◆ set_dense_primary_block_size() [4/5]

void tatami_mult::set_dense_primary_block_size ( MultiplyWithMatrixOptions & options,
int primary_block_size )
inline

Set the primary block size to use in all multiplication functions involving two dense matrices. See the \(B\) parameter in the Blocking for dense matrices section for more details.

Parameters
optionsOptions to be set.
primary_block_sizePrimary block size.

◆ set_dense_primary_block_size() [5/5]

void tatami_mult::set_dense_primary_block_size ( MultiplyWithMultipleVectorsOptions & options,
int primary_block_size )
inline

Set the primary block size to use in all multiplication functions involving a dense matrix LHS and multiple vectors RHS. See the \(B\) parameter in the Blocking for dense matrices section for more details.

Parameters
optionsOptions to be set.
primary_block_sizePrimary block size.

◆ set_dense_secondary_block_size() [1/5]

void tatami_mult::set_dense_secondary_block_size ( MultiplyDenseColumnWithDenseMatrixOptions & options,
int secondary_block_size )
inline

Set the secondary block size to use in all multiplication functions involving a dense column-major LHS and a dense matrix RHS. See the \(C\) parameter in the Blocking for dense matrices section for more details. Different secondary block sizes will not change the results.

Parameters
optionsOptions to be set.
secondary_block_sizeSecondary block size.

◆ set_dense_secondary_block_size() [2/5]

void tatami_mult::set_dense_secondary_block_size ( MultiplyDenseRowWithDenseMatrixOptions & options,
int secondary_block_size )
inline

Set the secondary block size to use in all multiplication functions involving a dense row-major LHS and a dense matrix RHS. See the \(C\) parameter in the Blocking for dense matrices section for more details. Different secondary block sizes may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
secondary_block_sizeSecondary block size.

◆ set_dense_secondary_block_size() [3/5]

void tatami_mult::set_dense_secondary_block_size ( MultiplyWithDenseMatrixOptions & options,
int secondary_block_size )
inline

Set the secondary block size to use in all multiplication functions involving a dense matrix LHS and a dense matrix RHS. See the \(C\) parameter in the Blocking for dense matrices section for more details. Different secondary block sizes may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
secondary_block_sizeSecondary block size.

◆ set_dense_secondary_block_size() [4/5]

void tatami_mult::set_dense_secondary_block_size ( MultiplyWithMatrixOptions & options,
int secondary_block_size )
inline

Set the secondary block size to use in all multiplication functions involving two dense matrices. See the \(C\) parameter in the Blocking for dense matrices section for more details. Different secondary block sizes may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
secondary_block_sizeSecondary block size.

◆ set_dense_secondary_block_size() [5/5]

void tatami_mult::set_dense_secondary_block_size ( MultiplyWithMultipleVectorsOptions & options,
int secondary_block_size )
inline

Set the secondary block size to use in all multiplication functions involving a dense matrix LHS and multiple vectors RHS. See the \(C\) parameter in the Blocking for dense matrices section for more details. Different secondary block sizes may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
secondary_block_sizeSecondary block size.

◆ set_num_threads() [1/13]

void tatami_mult::set_num_threads ( MultiplyDenseColumnWithDenseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a dense column-major LHS and a dense matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [2/13]

void tatami_mult::set_num_threads ( MultiplyDenseColumnWithSparseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a dense column-major LHS and a dense matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [3/13]

void tatami_mult::set_num_threads ( MultiplyDenseRowWithDenseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a dense row-major LHS and a dense matrix RHS. Different numbers of threads will not change the results.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [4/13]

void tatami_mult::set_num_threads ( MultiplyDenseRowWithSparseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a dense row-major LHS and a dense matrix RHS. Different numbers of threads will not change the results.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [5/13]

void tatami_mult::set_num_threads ( MultiplySparseColumnWithDenseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a sparse column-major LHS and a dense matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [6/13]

void tatami_mult::set_num_threads ( MultiplySparseColumnWithSparseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a sparse column-major LHS and a sparse matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [7/13]

void tatami_mult::set_num_threads ( MultiplySparseRowWithDenseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a sparse row-major LHS and a dense matrix RHS. Different numbers of threads will not change the results.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [8/13]

void tatami_mult::set_num_threads ( MultiplySparseRowWithSparseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a sparse row-major LHS and a sparse matrix RHS. Different numbers of threads will not change the results.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [9/13]

void tatami_mult::set_num_threads ( MultiplyWithDenseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a dense matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [10/13]

void tatami_mult::set_num_threads ( MultiplyWithMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving two matrices. Different numbers of threads may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [11/13]

void tatami_mult::set_num_threads ( MultiplyWithMultipleVectorsOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving multiple vectors RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [12/13]

void tatami_mult::set_num_threads ( MultiplyWithSingleVectorOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving single vector RHS. Different numbers of threads may slightly change the results depending on the choice of delegated function.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_num_threads() [13/13]

void tatami_mult::set_num_threads ( MultiplyWithSparseMatrixOptions & options,
int num_threads )
inline

Set the number of threads to use in all multiplication functions involving a sparse matrix RHS. Different numbers of threads may slightly change the results due to differences in floating-point round-off error, depending on the delegated function.

Parameters
optionsOptions to be set.
num_threadsNumber of threads, should be positive.

◆ set_sparse_block_size() [1/9]

void tatami_mult::set_sparse_block_size ( MultiplyDenseColumnWithSparseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a dense column-major LHS and a sparse matrix RHS. See Blocking for sparse matrices section for more details; the exact interpretation depends on the delegated function.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [2/9]

void tatami_mult::set_sparse_block_size ( MultiplyDenseRowWithSparseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a dense row-major LHS and a sparse matrix RHS. See Blocking for sparse matrices section for more details; the exact interpretation depends on the specific function called by multiply_dense_row_with_sparse_matrix().

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [3/9]

void tatami_mult::set_sparse_block_size ( MultiplySparseColumnWithDenseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse column-major LHS and a dense matrix RHS. See the \(B\) parameter in the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [4/9]

void tatami_mult::set_sparse_block_size ( MultiplySparseRowWithDenseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse row-major LHS and a dense matrix RHS. See the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [5/9]

void tatami_mult::set_sparse_block_size ( MultiplySparseRowWithSparseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse row-major LHS and a sparse matrix RHS. See the $C$ parameter in Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [6/9]

void tatami_mult::set_sparse_block_size ( MultiplyWithDenseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse matrix LHS and a dense matrix RHS. See the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [7/9]

void tatami_mult::set_sparse_block_size ( MultiplyWithMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse matrix. See the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [8/9]

void tatami_mult::set_sparse_block_size ( MultiplyWithMultipleVectorsOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse matrix LHS and multiple vectors RHS. See the \(B\) parameter in the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.

◆ set_sparse_block_size() [9/9]

void tatami_mult::set_sparse_block_size ( MultiplyWithSparseMatrixOptions & options,
int block_size )
inline

Set the block size to use in all multiplication functions involving a sparse matrix LHS and a sparse matrix RHS. See the Blocking for sparse matrices section for more details.

Parameters
optionsOptions to be set.
block_sizeBlock size.