Registered Member
|
Hi,
I saw in the documentation that SMID implementation for the log-function were already done in EIGEN 3. I tested the function ei_log from EIGEN but saw no difference in comparision with the std::log. Did I call the wrong function ? Thanks |
Registered Member
|
ei_log just calls std::log.
The SIMD implementation is ei_plog. It works on a packet of 4 floats. See in Eigen/src/Core/arch/SSE/MathFunctions.h.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
Thanks for the quick answer !
Does it work on double also, since I only use double ? |
Registered Member
|
No, currently only the float version is vectorized.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
|
Registered Member
|
I have another question : When I call the method log() on an Array/Matrix to compute the log coefficient-wise, is ei_plog used ? If not, what should I do to use ei_plog on an Array/Matrix ?
Thanks P.S: I tried to read the source code, but since my C++ is very elementary, especially Template, it was not quite clear to me, how did you do it. |
Registered Member
|
It's used as much as possible; falling back to ei_log when it's not possible.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]