Re: [eigen] Blocks and dynamic stack matrices |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Blocks and dynamic stack matrices
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Wed, 5 Oct 2011 13:52:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=31Xfx7hdSSSnQS0bEjLwnqHU+GLn6Ko+ywsuXwCHLqA=; b=ofVVnjK7KQjjSsw6mBtWLaSHuC+y6oHZKwGiPZXUf1sUKbLK/5rK3iIbVxe4fZ/csC xdHtpW9WecmzXCiSuL7GrDpO8yB6bLJNJrHr+c71MudWz8ejT6o++JMp2Ly7VazdzVmr qcIo5HzJ/WnFSlsUlgaFW0SG63Qo4UggpBTZU=
Sorry Gael. It seems that I messed something up.
- Hauke
On Wed, Oct 5, 2011 at 1:34 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> sorry but I cannot reproduce and I don't see what is wrong in this
> assert. Here is my test example:
>
> #include <Eigen/Core>
> using namespace Eigen;
> int main()
> {
> Matrix<double, Dynamic, Dynamic, 0, 3, 3> mat(2,2);
>
> mat.col(1);
> mat.row(0);
>
> return 0;
> }
>
> gael.
>
> On Wed, Oct 5, 2011 at 10:09 AM, Hauke Heibel
> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>> Hi guys,
>>
>> I am getting a run-time assert when calling ::row on a Matrix<double,
>> Dynamic, Dynamic, 1, 3, 3>.
>>
>> The assert is caused by the check in lines 291-293 of Block.h and the
>> issue is that BlockRows!=XprType::RowsAtCompileTime but
>> BlockRows==XprType::MaxRowsAtCompileTime. Changing the assert to
>>
>> eigen_assert( (i>=0) && (
>> ((BlockRows==1) &&
>> (BlockCols==XprType::ColsAtCompileTime||BlockCols==XprType::MaxColsAtCompileTime)
>> && i<xpr.rows())
>> ||((BlockRows==XprType::RowsAtCompileTime||BlockRows==XprType::MaxRowsAtCompileTime)
>> && (BlockCols==1) && i<xpr.cols())));
>>
>> fixes the problem.
>>
>> Does anybody see an issue with doing this globally in Block.h?
>>
>> - Hauke
>>
>>
>>
>
>
>