Registered Member
|
Hi,
I'm multiplying a vector with a Matrix with Eigen and it seems a a little bit slow in comparison with other operations The matrices are, MatrixXcd v1(SIZE, MEMORY) MatrixXcd v2(SIZE, 2) MatrixXcd gamma_tmp(400,400) gamma_tmp.col(i).segment(count, MEMORY) = v1.adjoint() * v2.col(index); I'm using MEMORY=50 , count is a position inside a loop ans index also takes values in 0 or 1. Is there any other way of doing this multiplication in a more efficient way? Thanks in advance João |
Moderator
|
you can add .noalias() to avoid a temporary and make sure you compiled with optimizations on (e.g., -O3 with gcc/clang or "release" mode with msvc).
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient