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 08:54:31 -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=Y7VNJWGFJ/gnkmQHokHzcWpJVPM4CKafbhh7MdRGNiQ=; b=bq6AUCEUWdgyv5t12rnD0gkRrtVpkm0UhMsd2l0iCPKOMlfMF8XE4OM1WjHlBCivtC IKeOZgBT9jCyQb8+T1UxEsJN2LzM7CotqJmwJvE3kqOvZnLN5kCXcaHOOZLKRJhZnuXV sWWCtGFVfFE+NwjaeYxCJE2wgUT6+Xi/sFxcE=
- 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=Y6wfqtBITcgaRNvXA8kEwVAhRJnOyDLiRXFdx7kI2t05d4Plkma6rzQyRthQO3pPzj dohn7IcIln0ue7c2cXM+GuwyT2vSR+rUtVqLpep3m6jk0iFpvyaW4EogIYFyeaW97ZqM a0QEAO0C56YcUhX4CEnPqIxbxr82aToxybznk=
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