[eigen] about the semantic of MaxRows, MaxCols |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: [eigen] about the semantic of MaxRows, MaxCols*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Wed, 3 Mar 2010 13:34:41 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=l1aXLmq58cMXM0Kex9hHr9yRZxE/ixtMaBJ/xsnQK28=; b=l+rw3juH4b24QrPt6t8NPWI0a3hEusM39J414JUf6QKhm1Ht1twYjIR3BNIrmy2YqY 5zLRWeHLRCQs/OMTOCbZCRnHmbq0tPwuTqG9K9tMdRuvGhoQIr4gTHDh5vTzhX4Yf9Dk hjLTAv4UdR8lOgPIiHtfeosNRHkPh6xTFDiGI=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=bKZSPORJfXiMlHZrVTfPhQ8moH9mye9HlvCAdfT+3H6oW/8sjrdsXGXqR8bCUJ+s1T UMq4LfyDyPLqBSAG6KcsRnsb2e2P1rSEECwCriFOPt7CAZettIy3W5Znnq0BRbQ7nf2k lk+q7U9Fsrfz/eL2PIm2JXgDj/aQ2pm6M33rA=

Hi,

A recent change of mine about matrices having different max sizes and actual sizes broke lu kernel computation. The reason is that I thought that in the following example:

Matrix<float,3,3,0,4,4> m;

m << 0, 3, 6,

1, 4, 7,

2, 5, 8;

the data were organized as follow:

0 1 2 x 3 4 5 x 6 7 8 x x x x x

i.e., Matrix<float,3,3,0,4,4> was like a 3x3 block of a 4x4 matrix. However, currently, the 3x3 floats are taken from the 9 first ones of the 16 statically allocated buffer:

0 1 2 4 4 5 6 7 8 x x x x x x x

i.e., Matrix<float,3,3,0,4,4> is really like a Matrix<float,3,3>.

So the question is shall we stick with the current behavior ? or shall we adopt what I thought it was ? Let's enumerate the pros and cons for the change:

pros:

* potentially allows for more vectorization since, e.g., it allows to align all the columns of a Matrix<float,3,Dynamic> using Matrix<float,3,Dynamic,0,4,Dynamic>

cons:

* this is a change so more work to do and potentially new bugs ;)

* such matrices lost the linear access flags

what do you think ?

gael

**Follow-Ups**:**Re: [eigen] about the semantic of MaxRows, MaxCols***From:*Benoit Jacob

**Re: [eigen] about the semantic of MaxRows, MaxCols***From:*Jitse Niesen

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Positive Definitenes?** - Next by Date:
**Re: [eigen] ARM NEON test results.** - Previous by thread:
**Re: [eigen] ARM NEON test results.** - Next by thread:
**Re: [eigen] about the semantic of MaxRows, MaxCols**

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