Is there any way to improve the performance of Eigen matrix multiplication using OpenMP or any other approach to enable multithreading? Currently, switching on OpenMP gives nothing.
inline void multiply1(
Eigen::MatrixXd &m,
std::vector<double> &vector,
std::vector<double> &result
)
{
int size = (int)vector.size();
result.resize(size);
Eigen::Map<Eigen::VectorXd> Evector(vector.data(), size);
Eigen::VectorXd a;
a.noalias() = m * Evector;
Eigen::VectorXd::Map(&result[0], a.size()) = a;
}
This function is called a great number of times during the runtime, so it has a very critical influence for total computation time.