Re: [eigen] issue 77: map with stride

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


On Mon, Jan 18, 2010 at 9:48 AM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> On Mon, Jan 18, 2010 at 6:25 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Then I thought about the example of tiny matrix-matrix products with
>> InnerVectorization and how they should specialize to matrix-vector
>> product... so you are right, this does matter.
>
> A reference to a code Example within Eigen would be cool. Currently, I
> don't really understand the problem.

I have to say that I'm a bit lost too...

>
>> But on the other hand, your convention that stride means "outer
>> stride" for matrices but suddenly becomes 1 for vectors, is much more
>> logical if vectors have innerSize==1, which led to my proposal.
>>
>> So we have a dilemma.
>>
>> Let's propose to solve this problem by decoupling the notion of stride
>> into two separate notions of stride: "inner stride" and "outer
>> stride". Outer stride is what you used to call stride for matrices
>> (not vectors). Inner stride is the spacing between two consecutive
>> entries within an inner slice, so it is equal to 1 almost always.
>
> Personally, I don't like the notion of inner and outer stride. For 2D
> objects, there should only be one stride function. Conversely, the
> stride for 1D objects should either not be called at all or it should
> be one. But as I said, maybe I am not yet understanding the problem
> this causes within Eigen.

As Benoit explain in his example, taking a row from a column major
matrix yields a vector object having an "inner stride" greater than 1,
so yes "inner stride" is an important notion.

To make things clearer, perhaps we could borrow the terminology of BLAS:
- "leading dimension" for matrices only (aka outer stride)
- "increment" for vectors only (aka inner stride).

cheers,
Gael.

>
> - Hauke
>
>
>



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