Re: [eigen] matrix::linspace |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] matrix::linspace*From*: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>*Date*: Sun, 24 Jan 2010 22:54:28 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=eqyeIq4NkNxKlqlmwXVGWw4FDYuqfIxDKcWPGw03dtA=; b=ak0P+ehMra/pMEY2WQZR5iruMpE+w6UGA2W5h8wcjDS3bSPPecG8+2tV0Tv70NL4tI f+q51CMvoYxcleopN0SwwKl5qLPO75wrE4+2zLfUgWobHMZsWZhwZfqrU8tRswdHj7NI BsnEI/1ahi/myhSaJ3oUEmF3YBLA1XOYvYs54=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=eDErxi2uMRBVxHHpZr/7Wp9dqI39k/sl6tgiVRemdiGC5csVssXHuXSiKktVpzYUU2 uzuVt0vQ4ihyGEIb48BYTgxO67peU/hyVnInZmVeBnSog3/P7dvYZo2wIK3Q0sG167ss KIsQRwTueOWS2wy0Kct7FRhnmlJ4Jr9EgMojc=

On Sun, Jan 24, 2010 at 8:16 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote: > 2010/1/24 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>: >> which is nice and reasonable. So, MSVC has an optimization issue over >> here. In my particular case, the unaligned cases are anyways empty and >> skipping them does not hurt. > > This could then be quite far reaching: this path in Assign.h is used > for much more than just this particular functor, so this is really > worth understanding and fixing / working around! I don't really understand what is going on nor why it is. I can tell that the ASM code is different and not optimal but I do not know exactly why. With some tinkering, I was able to create a fix which you find attached. In short, it does the following. The unaligned paths are once more wrapped into a proxy object which is specialized for cases where the unaligned path is non-existent (of zero length). We can make use of it in some cases, in particular, when the destination is aligned which we do already know at compile time. That approach allows MSVC to perform the correct optimization. I did not push since it's quite a low-level modification. - Hauke

**Attachment:
assign_opt.patch**

**Follow-Ups**:**Re: [eigen] matrix::linspace***From:*Hauke Heibel

**References**:**[eigen] matrix::linspace***From:*Hauke Heibel

**Re: [eigen] matrix::linspace***From:*Benoit Jacob

**Re: [eigen] matrix::linspace***From:*Hauke Heibel

**Re: [eigen] matrix::linspace***From:*Benoit Jacob

**Re: [eigen] matrix::linspace***From:*Hauke Heibel

**Re: [eigen] matrix::linspace***From:*Benoit Jacob

**Re: [eigen] matrix::linspace***From:*Hauke Heibel

**Re: [eigen] matrix::linspace***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] matrix-matrix pow()** - Next by Date:
**[eigen] LeastSquares, Pseudo Inverse & Geometry** - Previous by thread:
**Re: [eigen] matrix::linspace** - Next by thread:
**Re: [eigen] matrix::linspace**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |