Re: [eigen] [eigen3] .cwise() vs .array() and static assertion |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [eigen3] .cwise() vs .array() and static assertion
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 16 Aug 2010 09:00:59 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+p07f5uETXCMAE9LIf/MSAyAaRFbNwru8vWOABe5sco=; b=CHSM49QXhP06e4duD7vC5sXMzoOXjVKV9rnvTufD0E1I06KdzPoCOln0cJD2VZs2rO KOq03pD4eMzrXaQCjOJqq1rMpeX/KJD3MGCI3jik2cRrkZ/Yg5VXRJC4VP4Y6gLRwAUI Fk3eUTCyUeAxrYjiszMYqFgRWEaMYbsDkAW9w=
- 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=Zk8IdCSqNB5Fp3SyHu1xR3QgDgmOdku/7bKKUeLGV1Y2xG9wSi1FJQB0/xAsrCRbx6 EHxE1i3OYoP51yBRUeZmVCXkYdQIyCuYDhkI3uDUHZRbMe+mxw6IcbrUyJ7/a5FojXsL XHmoJoZ1qm6hM2+hfSbhlj8SvCP3Nsees9ZNg=
2010/8/16 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> from changeset d9f25c6413a8 you also get the explicit:
>
> Eigen/src/Core/MatrixBase.h: In member function ‘Derived&
> Eigen::MatrixBase<Derived>::operator+=(const
> Eigen::ArrayBase<OtherDerived>&) [with OtherDerived =
> Eigen::Array<float, -0x00000000000000001, 1>, Derived =
> Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>]’:
> jitse01.cpp:14:7: instantiated from here
> ../Eigen/src/Core/MatrixBase.h:433:6: error:
> ‘YOU_CANNOT_MIX_ARRAYS_AND_MATRICES’ is not a member of
> ‘Eigen::ei_static_assert<false>’
This looks very good, thanks!
Benoit
>
> gael
>
>
> On Mon, Aug 16, 2010 at 11:08 AM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> Hi,
>>
>> you now get the following error message:
>>
>> Eigen/src/Core/MatrixBase.h:432:46: error: ‘Derived&
>> Eigen::MatrixBase<Derived>::operator+=(const
>> Eigen::ArrayBase<OtherDerived>&) [with OtherDerived =
>> Eigen::Array<float, -0x00000000000000001, 1>, Derived =
>> Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>]’ is
>> protected
>>
>> not ideal yet, but much better.
>>
>> gael
>>
>> On Wed, Aug 4, 2010 at 3:30 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>> 2010/8/4 Christophe Prud'homme <christophe.prudhomme@xxxxxxxxxxxxxxx>:
>>>> Hi,
>>>>
>>>> I am starting using eigen3
>>>> I got this message
>>>>
>>>> THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS
>>>>
>>>> triggered by this code:
>>>>
>>>> tmp -= (0.5 * ii)*scalings().row( ii-1 ).array()*bs[ii].row( jj ).array();
>>>
>>> You are doing:
>>>
>>> matrix -= array;
>>>
>>> which amounts to:
>>>
>>> matrix = matrix - array;
>>>
>>> the mixing of matrices and arrays on the RHS is illegal, so you need to do:
>>>
>>> tmp.array() -= (0.5 * ii)*scalings().row( ii-1 ).array()*bs[ii].row(
>>> jj ).array();
>>>
>>> I do agree that the error message is not helpful, needs to be fixed.
>>>
>>> Benoit
>>>
>>>>
>>>> any idea what this means ?
>>>>
>>>> The code was compiling before with cwise()
>>>>
>>>> tmp -= (0.5 * ii)*scalings().row( ii-1 ).cwise()*bs[ii].row( jj );
>>>>
>>>> Best regards
>>>> C.
>>>> --
>>>> Christophe Prud'homme
>>>> Université de Grenoble christophe.prudhomme@xxxxxxxxxxxxxxx
>>>> LJK - Room 55 Tel: +33476635497
>>>> 51, rue des Mathématiques Fax: +33476631263
>>>> BP53 38041 Grenoble Cedex 9
>>>> <http://ljk.imag.fr/membres/Christophe.Prudhomme/>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>