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 09:18:56 -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=Q2sqBDjOUfpvgujZeep2r0e3QoILh8dzkHU0a3/2Fn0=; b=V7F0KElqRXOdmIr//pyV+8t5e+n2aF404IjLDcrX36YqA4g+Y2qsfYq/vnKg6Zz2t9 gKtpcnY53FDIMGorAxXTy2whG1UiPFFofe8D1+lL8NbkW/cObxeLxKX3d070dU7XNfUu A6IsylA0uJGe0kyUW8IiEOY16Y0/RVtW9DvRU=
- 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=bRFumAHtsMZnekE/byT2HvgA1bOAKWDPqolDCwBrAulTnb3NkgNyblS9xrzFgOo0UE rJwHjaofdkYf3yqtgweI1zB3gwKZsswuo/YTVhzdZZf2YE8M6IUDM0gLaUs1LGjjeUF7 iRp4m39x6RtT3FYOwk/6dlYmxLV/6SxcN4vGQ=
(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
>