Re: [eigen] integer types - something's odd... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] integer types - something's odd...
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 8 Jun 2010 07:30:10 -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=wurvN2+a5LS7HqZzLuAFzoljIoF/dEN10d4cL43L6og=; b=Mr2/AI+08XIcIkraxTsv41q7E/DoRYAmh1N064ocl2CRHG6CfqmpDUeesVxZUqXe9x OhjzgfHS34WIU5EkqEcpiVHyycwjVBwdK6yyuU68C7lgSy52lI/FDGpuvWQU3Ocdp1js iS8XHfYWiMWEwnnIHm3qdY5VXCd7K2XKh0ASc=
- 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=HI+DeWtJxO8DI5JJvj71eRWKwDnWt7oOydkRG6VHou2XHqLv6G7EfJLmJ3jJWK5bzd zXQjBsgZVMEmdI6/pho9WYY5Gs8Wlh0PeWuj+LWq6rpCgeUHA66Gd0DibfT93DpjYuMi 2qk3y1Bv06R95uOzwWk37JlTnxnz5Ra4OTNow=
2010/6/8 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Tue, Jun 8, 2010 at 3:59 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> But it's true that it's ugly, so, feel free to fix that. For example
>> by isolating the tests that would emit warnings with unsigned types
>> into separate functions...
>>
>>> and then I tried to
>>> run it in debug mode and I got an unaligned memory assertion on
>>>
>>> m3 = m2; m3 *= s1;
>>> VERIFY_IS_EQUAL(m3, s1*m2);
>>>
>>> while calling
>>>
>>> CALL_SUBTEST_1( integer_types(Matrix<unsigned long, 3, 4>()) );
>>>
>>> I tried to reproduce this in a separate program but failed. Does
>>> anybody have an idea?
>>
>> can you paste a backtrace from that assert?
>
> I attached the back-trace.
>
>> Does the assert persist if you replace unsigned long by signed long?
>
> Yes, it does persists.
>
> Furthermore, changing lines 111-112 to
>
> m3 = m2; m3 *= s1;
> VERIFY_IS_EQUAL(m3, (s1*m2).eval());
>
> fixes the issue too.
>
> Also, changing lines 370-371 in the main.cpp to
>
> template<typename T, typename U>
> bool test_is_equal(const T& actual, const U& expected)
>
> solves the issue and I think that is the real fix. Passing aligned
> types by value destroys the alignment.
ooooh.... sorry! of course it does, we even have a dox page about exactly that!
Benoit
>
> - Hauke
>