Re: [eigen] about changeset fa29f384b58e2 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] about changeset fa29f384b58e2
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 11 Jun 2010 16:28:40 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=xQkvw0881gcA8MCi/9A0jdg9YrceTzW6OsrWPU35wn0=; b=hQDC6mQok3n/MgBFwHJq6Kev0FzQoCXy2hzLuqOvIPB1nljrmxSdJye1ev2Dia66ZN jPXSsVBUrkSr7sWcEPaH7dsq9C8Ag6wp9kvh9t06AQKTJFdaTvjRRtGx4B6NxRmd5BvQ IQK/nH/u6qvRw6gxOhfYZoWlNgHnufmay9hvM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=LlccmNe/UlKJamFpZBpRfiUXiKNL+Kj1+qrh9vJBZyQsA0UIg8LQscpvrf8gX68PxL wh/MqOWogQUo8QVloivEUFIhRou4SfXZQmh4JtZM/gX+TdUZH+Y83YA6nS+mX6YZ56jZ jyeWVJ4XcAPNk6B10XJfImunc1GLhIqWoVOtk=
On Fri, Jun 11, 2010 at 2:28 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Hi,
>
> This changeset fixed a bug preventing products involving Map
> expression from being properly optimized, but the fix was not the
> right one:
>
> # Node ID fa29f384b58e26b3dc69e8483d93f7080e3a3616
> # Parent 57403e3ebd7764ac50d647b056d887ecf0fe8eee
> fix issue #128 : inner stride can also be 0 in which case it means 1...
>
> diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h
> --- a/Eigen/src/Core/util/BlasUtil.h
> +++ b/Eigen/src/Core/util/BlasUtil.h
> @@ -157,17 +157,17 @@ template<typename XprType> struct ei_bla
> enum {
> IsComplex = NumTraits<Scalar>::IsComplex,
> IsTransposed = false,
> NeedToConjugate = false,
> HasUsableDirectAccess = ( (int(XprType::Flags)&DirectAccessBit)
> && ( /* Uncomment this when the low-level
> matrix-vector product functions support strided vectors
> bool(XprType::IsVectorAtCompileTime)
> || */
> -
> int(ei_inner_stride_at_compile_time<XprType>::ret) == 1)
> +
> int(ei_inner_stride_at_compile_time<XprType>::ret) <= 1)
> ) ? 1 : 0
> };
>
>
> The real bug was that the inner-stride-at-compile-time could be 0. The
> 0 value in Stride, meaning used the MatrixType's default, should never
> have been propagated to the Map traits. The fix is coming in the
> Dynamic ---> -1 merge.
ok, good :) Actually, this is what I initially thought when debugging
this but all this stride mechanism scared me and I thought you
probably had a good reason to do so ;)
gael.
> Benoit
>
>
>