Re: [eigen] issue 77: map with stride |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] issue 77: map with stride
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 18 Jan 2010 11:15:14 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=/YOmwIhttyB0WYcQNzBWlgcWbUuD//w+mU9X3d9JTpw=; b=uB59zROW5HiwpvUztUYUJ4p+j4E/yZM1LzfStz4HKHDSZXW0OA83ou64KJ5aJNsfQq kbwBGmWVAvPiUV3b5wx6diuXyE1ngH6C/ZiVs+2zClTgW3NZEpHcl1b38Vssx+WIoSLK BvMJvbbacF/hbPbiSvaD8iVnIoRxl+nb8v/Ug=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xfZr112iDxHLb2QctsA2afllkEQTSD4b67utYIAxbytOSOr9BMdRJFdHYTFk18Qmjr /EuwZWzut66lbgX7y9bwKpYTjqX8sx8oUzM0u/HDN8sDcZogi2Uv/8SJzGT/+HZeKc52 Qlphwyf6LPsF6QI+/j7AUF1uQmQKbT+r8jhFg=
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
>
>
>