Re: [eigen] Assertion failure doing matA.col(??).noalias() = matB.row(??) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Assertion failure doing matA.col(??).noalias() = matB.row(??)
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 2 Sep 2010 18:53:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=tcaqKp2I5+oWJ917M+dDuTCbbQHxEOvr8SadvBLR0GQ=; b=DPfuiUMtze7lzoPCRvX4+CZlzxn+vcelxhwpRJlRKIzpVDvfELj03gWk85bmGUVV9f kYUN9/T1g/K8gvFRFGN8Jo3zI81k5/soaQMgEb7boLR9Wfd8xHk3efdZieklFofllNdD BO35TKajH8us7m3tfEJSaZdY0Kgwej0EasyW0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=uINiA0EUFGSVnC9ejNiI+hPyp2ZgcVEIN2ZfCQhLU1DhgnSmfa+lPtk4u4lNPegzZa nf/0JcunzdOkoLhYCx7z999C6wQVrA/lCbenTLqRgsK5FPtHvI1FnPJbD78MvIVdfzuE PvwM7SGMjXhJ773xpv8dZsZciuuYGSdOF4824=
ok thank you for spotting it. fix and unit test within a few minutes....
gael
On Thu, Sep 2, 2010 at 6:39 PM, Eamon Nerbonne <eamon.nerbonne@xxxxxxxxx> wrote:
> The following code fails with an assertion (on g++ & MSC)
>
> MatrixXd matA, matB;
>
> matA = MatrixXd::Random(12,15);
> matB.resize(matA.cols(),matA.rows());
> for(ptrdiff_t i=0;i<matA.rows();++i)
> matB.col(i).noalias() = matA.row(i); //<-- fails here!
> assert(matB.isApprox(matA.transpose());
>
>
> Without the .noalias, it succeeds. Is this by design? It's confusing, at
> least...
>
> --eamon@xxxxxxxxxxxx - Tel#:+31-6-15142163
>