|Re: [eigen] integer types - something's odd...|
[ Thread 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: Mon, 7 Jun 2010 21:59:49 -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=FcRVN4JrlwBcMHluO4bUgWYpmKSCZpgc1tZMQ9RwmbU=; b=BA7NN+zusnNt+JcqZ8q5+vxNds9nLPTTzi92CPpEaVLqirYlK4nsaxkOsYnBSde3My +0xQ7URCXZ7Sob5DUpqJY9a28sQwjlj1kUpOifaKwiz2XAZgGdLfL/5ZikciFEX6yAWC vQuqsNDM5NMgKv/MCMpce3CN3Rsi44gehPN0g=
- 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=EGudP+Gnb7OEsP8KaZEss0Q0mAMX6SQZES0fdKuAvBZ44TCel69GoydSm7nN/g/AOL 34AwItSLvjwXWAMZkPO6PAETCp2OcsyDUhdQyKTBe9ozthsN5cdTCoDrknT5ZJIworBy 1eOyehByZJu6r+f0NEu04pXqWd/kxbKsdqG3o=
2010/6/7 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> I tried to get rid of some of the MSVC warning since we are once again
> hitting the 50 warnings limit and the dashboard is at its limits. ;)
> Well, by trying to do that, I stumbled over something strange in the
> integer_types test. I seems natural that it generates a bunch of
> warnings since in some cases we are negating unsigned values. First, I
> was surprised that the test was anyways working
It's just arithmetic modulo 2^N... the usual arithmetic rules are the
same as for integers, and our integer_types tests are only based
around such simple arithmetic rules, so the wrapping around doesn't
make them fail :)
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?
Does the assert persist if you replace unsigned long by signed long?
> - Hauke