|Re: [eigen] Re: Strong inlining is sometimes ignored...|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: Strong inlining is sometimes ignored...
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Thu, 15 Oct 2009 19:00:39 +0200
- 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=hqwkJuch5qzx6Ke//99VG1rzwHY6DDrtfklvS5JF/g0=; b=UH4SsqHSgGCMRnLunVyYladrNzYkMooflRGJKUI2jLgwlB4Rf9ZXKcKd/taD84CIUq aQZ/qWGV4csuYCd5WQtYpoqi/SD7RIsKRjf05oCjAvvUHiZF18vEpa0m1M+eDghDjTbM 8YQ9RB7hedDro7CJWgqxBw4y8lf6eiqomP0h4=
- 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=lZyAiaUNipPdArpRSIvyzLbfrvamyerpvHQDU2YxIk/c4uI0PEjgru4CifcEjIgfNN 5H4AP9QVO47xZjfzeqfHr2KeHBIbTO/dEn9uuouBBW4ZifyNyVa67BlqV5mlCRIM9fcj gw9kQ5zchYaylw2XyVlH2ci8pkZX6jLdK0DAc=
It is easily explained.
When SSE is disabled,
Redux.h line 92: ei_redux_novec_unroller<...>::run(...)
is called. This implementation simply unrolls with the functor.
In case SSE is enabled,
Redux.h line 299: ei_redux_novec_unroller<..., LinearVectorization, CompleteUnrolling>::run(...)
is called. This code contains an if-clause for the case when 'VectorizationSize' is not equal to 'Size' which calls the functor for the remaining vector entries. In case, we have even sized vectors, this code is compiled with zero length.
The easiest way to get really rid of this if-clause is to write another specialized functor for this case - this is possible since it can be computed at compile time if the _expression_ is fully vectorizable or not. Specializing the whole ei_redux_impl might be a bit painful since it would require to add an additional boolean flag - for all cases.
I just created a patch with all fixes...
On Thu, Oct 15, 2009 at 3:12 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
Second, I'd like to understand, why is this in
ei_redux_novec_unroller, while precisely you found that the issue
happened with vectorizable cases, so why not in ei_redux_vec_unroller
No idea... I have to take a look at that. It seems that when EIGEN_DONT_VECTORIZE is enabled LinearVectorization is never used. So _novec_ still allows linear vectorization. I have to double check the code.
Description: Binary data