This forum has been archived. All content is frozen. Please use KDE Discuss instead.

What is EIGEN-Implementation of log ? (Eigen 3)

Tags: None
(comma "," separated)
lamtung
Registered Member
Posts
28
Karma
0
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
User avatar
bjacob
Registered Member
Posts
658
Karma
3
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!
lamtung
Registered Member
Posts
28
Karma
0
Thanks for the quick answer !

Does it work on double also, since I only use double ?
User avatar
bjacob
Registered Member
Posts
658
Karma
3
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!
lamtung
Registered Member
Posts
28
Karma
0
Ok, thanks !
lamtung
Registered Member
Posts
28
Karma
0
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.
User avatar
bjacob
Registered Member
Posts
658
Karma
3
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!


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]