|Re: [eigen] log10 support?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] log10 support?
- From: Trevor Irons <trevorirons@xxxxxxxxx>
- Date: Mon, 7 Jun 2010 16:28:07 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=/B5urGWCEsUZy2eqj5O7ClPDy6320+seSAwgcgC8iRk=; b=umYPkh/kIf6fTusDGEffy8/Jta0Wq9QEm62IrD/bIjoZojKxGe4DRNLvaNT9GFUPPT wmL2SGWi1y5n+rtjkfbm+QZ8gOhdDN0o2U6PVMXkmxq8EeACLXd0glPYdCJu7zz4VdNu 5AgyP/sBgQzYuVJDn2KWFenKFMHrimR2KNJTc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QOXQArFu4nkPyrSiifxyClu/Ex3lPLRUeSBtZ/lR7F3r4pjDwPCxIIF35h4f5AZWxj roBbs//bKAMONWKPM5w3bmXzaGHj/gFYWe6ej0yoVx4a/6q6l93NYCdx3HaNOxCKA7wH crcJTUDe75slz5l37PmRnxRgel1V+U8HBnFWU=
OK, thanks. I'm on a really old machine and can't check sse here. I'll test your code and generate another patch. Unless I hear that is is unwanted.
(This just goes in eigenNes/Eigen/src/Core/arch/SSE/MathFunctions.h) right?
On 7 June 2010 15:46, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
Let me try to answer for Benoit. :)
This is because std::log is not right away available as an SSE
On Mon, Jun 7, 2010 at 11:20 PM, Trevor Irons <trevorirons@xxxxxxxxx
> Sure, I can do this. I prefer store a minimum of constants. But if it will
> be faster, then sure.
> Why won't calls to std::log10 be vectorized? No sse instructions?
intrinsic and we have a special version based on the code from here:
Nonetheless I think your patch is the right way to go. We could
achieve easily what Benoit suggests by offering a version of ei_plog10
Packet4f ei_plog10(Packet4f x)
const Packet4f ei_p4f_log10 = ei_plog(ei_pset1(10.0f));
return ei_pdiv(ei_plog(x), ei_p4f_log10);
which uses "Packet4f ei_plog(Packet4f x)". The constant would probably
be taken care of by a decent compiler, i.e. I don't think we need
I am pretty sure he meant that it would be nice to really have this in
> Also, is there any desire to have log10 defined your way in Eigen, for convenience? Or are you just suggesting I do this locally?
Eigen and not just in a local copy... though I am wildly guessing.
p.s. I am pretty tired an hope that I picked the right conversion factor ....