|Re: [eigen] Indexes: why signed instead of unsigned?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Indexes: why signed instead of unsigned?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 11 May 2010 11:35:17 -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=LgOAoc27cgENnsvwvOe8rDsptOrjPUSJ7ROGpDQ+lbA=; b=u+/j6v5Hs9KBo6UQ5hfO7/W7wt6EYWA6+pE1Os6Y0TiN9fbD5fLS1x23t/rK08mYmw BwAR6PwlLe21MLegBZOGAkFzA4Pt5BOJjrW5Y6xs9QvJDQ0hZ3J6ixdtJ2QaXjZQpMcH UHeFgVaBlVKzTbFeBuM50MYZ0j31JQS/njOWA=
- 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=i2soqIkYtmwM5NtpgZTSUcGFOtWVCBBu9cDfNkPLasaJMSspPo1m+k+EQnWj5ZzOt8 PJQnV8z/Q9eLupVPdUTfV+py5uLFx61BebS6nNGNMVc2Ahku/FbGI6asV+g5FZ7PQVpq LurVlVNTDGJZdNprgTGiHH2M/S4m08lWIkOxs=
2010/5/11 Adolfo Rodríguez Tsouroukdissian <adolfo.rodriguez@xxxxxxxxxxxxxxxxx>:
> On Tue, May 11, 2010 at 5:07 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
>> I tend to agree that we need ptrdiff_t instead of int. I'd suggest:
>> typedef std::ptrdiff_t idx;
>> so we get something short to type.
>> There remains the question of signed vs. unsigned. In other words,
>> ptrdiff_t vs. size_t. I'm totally unable to decide either way. Help!
> It would be nice to see if there is consensus in this respect among other
> linear algebra packages. What do the more common alternatives use?
> Here's a couple of examples I found by a quick search:
> - blas uses signed integers:
Bing, this is very important indeed!
> - boost::numeric::ublas uses unsigned integers:
Boost::ublas not comparable in importance to BLAS...
> - OpenCV use signed integers:
good to know.
>> 2010/5/11 joel falcou <joel.falcou@xxxxxx>:
>> > Rohit Garg wrote:
>> >> This will become an issue when people start using bigger datasets than
>> >> 2GB. At a minimum, we need a eigen_size_t typedef somewhere for easy
>> >> portability. Using long throughout in 32 bit machines doesn't make
>> >> sense.
>> > Isn't it what ptrdiff_t supposed to be ? biggest signed int on the
>> > platform
>> > .
>> > --
>> > ___________________________________________
>> > Joel Falcou - Assistant Professor
>> > PARALL Team - LRI - Universite Paris Sud XI
>> > Tel : (+33)1 69 15 66 35