|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 13:07:55 -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=cnEKJFE2h/6riX4pjzV1STb1AUO9btpPJRznJKnx0ZA=; b=DdMCIPmV/hdio1abqDyyBcADllmBWIcTiES1t7BdzrsrEPDGbvs9u42xHcqVPay+3e j1TvylixS5TMDDwPr7xXtI4BZSmjy2Zt6E/LRHiuxiMct54HK7UrhGVfTx5szG0PUKVU pc4jv4I64avZ0JB9JhRefKxgyHyX0mo9Dwt4s=
- 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=Lq99g/3X+2OlFUotZSaDP0P1LEwLpd2NL7j4vUREmSFaooZ5K17I9sJzvtTKr+0Qmr HBmXD87mLPchm6TtF8uJY5BXpN9tK/qwpHwOgk2POsVDO1qMim25+pYcDFeN55zK+j5f pUDvUfMsHq14p0Wb3863sLU91UbswLHbvT+gg=
Note: the distribute storage case is an example where one might want
64bit indices even if the CPU architecture is 32bit. Indeed, since the
array doesn't need anymore to fit in RAM...
So it's an example where ptrdiff_t may not be the right choice.
2010/5/11 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> grrr, i had forgotten but a while ago someone inquired about the
> possibility to use eigen with distributed storage, and we took that
> into account when doing the big class-hierarchy-refactorings, to
> ensure it's possible to plug in a new storage system, see
> StorageKind... so it would be a bit too bad to restrict the indices
> types to int.
> This actually suggests that no matter what the default is, the indices
> type should be something that the Storage can control. This would also
> allow Sparse matrices to use different index types. We could make it a
> typedef in ei_traits, that is propagated to nested expressions, ...
> Gael, what's your opinion?
> 2010/5/11 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
>> 2010/5/11 Rui Maciel <rui.maciel@xxxxxxxxx>:
>>> On 11 May 2010 16:47, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>>> I just had a diabolic idea, if we agree that bigger-than-2^31-support
>>>> is not a top priority and will at most be used by relatively few
>>>> people, then we can keep things unchanged for now, so keep 'int' in
>>>> Eigen 3.0, and later on, when actual people actually need it (perhaps
>>>> in eigen 3.45), add a non-default compile-time option
>>>> EIGEN_USE_LONG_INDICES. Such an option would then break the ABI of
>>>> Eigen classes, so it couldn't become default.
>>>> Question - is BLAS/LAPACK using int or ptrdiff_t ?
>>> As this move will break the ABI then why not implement it right on the
>>> 3.0 release instead of pushing it to a point release in the future?
>> Because we've a lot on our plates already now.
>>> Rui Maciel