Re: [eigen] Indexes: why signed instead of unsigned? |
[ Thread Index |
Date 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:07:47 -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; bh=gSKC5c5yze44SStrqOsHHCpWzXbatsG9eYLMiGGWHv8=; b=bT6DS2NQWcUwHlUdg502V33lo8S6s49uqChVb9ayLtySgSJMvXQIQ7PmiEhSVVEpRp CbQgSA1fV/Ef8h7KeMt9jcfUQq/vp3wXyAws0KYgduJiJzq912TJuNzvEijnvdqN+r2h CIMzOgP4XA7QKggP05EC/M5uQFmlknSxHoCMI=
- 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; b=Jd5diCjdrkoqBoNbE6/vv7ikHg+6LjCZU3YwSj3LWP/ev3pxP4XiTtMWQ0zpI9PlrD 5T1Lf4sP8HyrGn4FChjgneRiXy/9wnMGDJcvXPILRWyNK4/WqKTq+379lp93rV35VFVs gSJGj8SdwAmsCy2QXhDfnqZgSqmcF68PMX5kE=
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!
Benoit
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
>
>
>
>
>