Re: [eigen] ei_redux_impl & ei_alignmentOffset |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] ei_redux_impl & ei_alignmentOffset
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 16 Dec 2009 08:05:57 -0500
- 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 :content-transfer-encoding; bh=8YVL5RyEaHUNx6K24QK4s5nX+GMPBbPjCtnrqjCfV2Y=; b=vQyBksBUKQ0D9EvOYAk/9TN9bpQM5vQEAzicwmNePYOfU6BV2Jy6DTBoVlAnEquppW MX3MtfddD0pGehCeqDpk/53CYiKY+tEu3xkJ4vIVjhd+7bMILcXcVXDUw/TkLMDxwuJz LXN792lydWC9xEOA5OXw0myUXBx0QQiNKldlA=
- 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:content-transfer-encoding; b=QYUgHw1YhmRRbPJoQ9XfBR2NN0Wxb0PQtTBDxkfLsnbngyxW7bpAuBy9L6nF8Mp9Ob Ju/T8UUw+nMaUWEJZlIF7VsSdKsNzwn3mAhSuljCa081727d6rsExPsUXP1b9FDlUq6S tjLy0JhNYiR6cEMmyqiIMSZ0tFKlyzNDVpJEs=
2009/12/16 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> *oh*
>
> I know where you can very plausibly get an infinite recursion. It is
> in the call to coeffRef() itself!!!
>
> Indeed we define it only for lvalue expressions!
>
> Here your cwise().abs2() produces a rvalue expression, hence it
> doesn't have coeffRef() defined, hence matrixBase::coeffRef() calls
> derived().coeffRef() which is itself!
>
> Solution: in the line,
>
> &mat.const_cast_derived().coeffRef(0)
>
> replace coeffRef by coeff.
.... and thus, you can drop the const_cast.
Benoit