Skip to content
Snippets Groups Projects
Commit 88a786c4 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add support for TinyMatrix-TinyVector product

parent ff203f13
Branches
Tags
1 merge request!71Feature/language tiny matrices
......@@ -39,6 +39,19 @@ BinaryOperatorRegisterForRnxn<Dimension>::_register_product_by_a_scalar()
std::make_shared<BinaryOperatorProcessorBuilder<language::multiply_op, Rnxn, double, Rnxn>>());
}
template <size_t Dimension>
void
BinaryOperatorRegisterForRnxn<Dimension>::_register_product_by_a_vector()
{
OperatorRepository& repository = OperatorRepository::instance();
using Rnxn = TinyMatrix<Dimension>;
using Rn = TinyVector<Dimension>;
repository.addBinaryOperator<language::multiply_op>(
std::make_shared<BinaryOperatorProcessorBuilder<language::multiply_op, Rn, Rnxn, Rn>>());
}
template <size_t Dimension>
template <typename OperatorT>
void
......@@ -58,6 +71,7 @@ BinaryOperatorRegisterForRnxn<Dimension>::BinaryOperatorRegisterForRnxn()
this->_register_comparisons();
this->_register_product_by_a_scalar();
this->_register_product_by_a_vector();
this->_register_arithmetic<language::plus_op>();
this->_register_arithmetic<language::minus_op>();
......
......@@ -10,6 +10,7 @@ class BinaryOperatorRegisterForRnxn
void _register_comparisons();
void _register_product_by_a_scalar();
void _register_product_by_a_vector();
template <typename OperatorT>
void _register_arithmetic();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment