[eigen] Blocks and dynamic stack matrices |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Blocks and dynamic stack matrices
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Wed, 5 Oct 2011 10:09:36 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=5n2/6qLNCHV5K3HtPqzVGd25HLgzSEUgTnVMgB+sv9g=; b=DTFchjIy1D4+23dHI/m90BIy9caV7fqGKzv7t3J8BAx7DdZCVKcvjSrLwFDo9gw2on qVOX1aCmNkce6tXsfo+fyMNUtchiiwiezIiftNmDWXJOqrA3SRVh60JrCTHZZh/PY4BD vWSD0SXFlL3WSqn/qQ/1SqYTvyQIq+rQdafos=
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