Re: [eigen] about changeset fa29f384b58e2

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


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
>
>
>



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