Pressio / pressio

core C++ library
Other
45 stars 7 forks source link

ops: eigen: revise `elementwise_multiply` #599

Closed mzuzek closed 1 year ago

mzuzek commented 1 year ago

refs #523

Overloads

Eigen elementwise_multiply has one overload which requires the underlying scalar type to be the same for T, T1 and T2 and to be known integral of floating-point type:

elementwise_multiply(const alpha_t & alpha, const T & x, const T1 & z, const beta_t & beta, T2 & y)
type name requirements
T, T1, T2 ● each can be Eigen native vector or rank-1 expression
● all must have same underlying scalar type
alpha_t, beta_t must be convertible to the scalar type

Tests

Unit tests (in tests/functional_small/ops/):

file name test name tested type
ops_eigen_vector.cc ops_eigen.vector_elementwiseMultiply Eigen::VectorXd
ops_eigen_diag.cc ops_eigen.diag_elementwiseMultiply pressio::diag( Eigen::MatrixXd )
ops_eigen_span.cc ops_eigen.span_elementwiseMultiply pressio::span( Eigen::VectorXd )