Re: [eigen] Indexes: why signed instead of unsigned?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


(I'm starting to lean towards size_t myself as the frequent comments
we get suggest it's what the rest of the world has standardized on,
and there's no huge reason not to do that...)

Benoit

2010/5/11 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> There's a new thread on the forum about that (sigh).
> http://forum.kde.org/viewtopic.php?f=74&t=87883
>
> Let's settle this once and for all. There are 2 debates:
> 1) signed or unsigned?
> 2) int (that is 32 bits) or same-sizeof-as-pointers (e.g. 64bit on
> 64bit platforms)?
>
> For 2) signed, we could do ptrdiff_t, i guess. Unless you're sure that
> 'long' is actually on all platforms the size of a pointer. I still
> dont know whether 2) matters. Certainly not for cubic-complexity
> algorithms (would take forever). But for plain "level 1" operations,
> perhaps it's plausible. Feels like we shouldn't arbitrarily restrict
> sizes to 32 bits. Opinions?
>
> For 1), I don't know. the forum poster mentions a reasonable way to
> write decreasing for loops. It's true that such loops are not too
> frequent anyway. I dont know. Asking for opinions. Dont want to impose
> upon you a decision made 3 years ago when I was a "noob".
>
> Gael? Hauke? Jitse? Thomas? everybody?
>
> Benoit
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/