|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 19:12: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=dZb1pc+Lx0lt/nRTvxKI1zey+XqO70yBmhaOs9w2EK4=; b=vSxK2NuxTmnoRdvJAsG4hw7OYvjEZCSonhwvDiFcH/YIJtxzsJiO2JIpCPcLBLahwf CNIDYv43x9UBh7jCsaSXvjaSF/SIo/T+k9slC6GmE1U9A2zyu5p5xBIEfJJ8oWJTIBBl /WUQ7ucVgVebhS+M0HEXe9NsQcTNhkaoCs/gw=
- 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=ncHizugk+Y+TeuQJh+NjjJY0EODp/6klS6Bn63CSdCMfcixtwvsbX5vtEep07aQSxI OIIYt7dxl5PDbXnvpTN6M4AJbndRIyWbk0zgZhLsgffiRjcVkNCK/QZRi+GvPc9tkeK7 Q2Yz8DOJK4LzdJeAUH4MO/N1+27MYvyk6B4CY=
2010/5/11 joel falcou <joel.falcou@xxxxxx>:
> Benoit Jacob wrote:
>> 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.
> make it a dependant type of the storagekind and have it defualt to ptrdiff_t
> in the
> non-distributed case ?
Right, I think this is the right approach.
Here's why I initially didn't realize it was the right approach: i
thought, if we allow Sparse matrices to have an option (via some
template param) to change the index type, then, since the StorageKind
is Sparse in this case, the StorageKind won't be enough anymore.
Here's why it's not a problem: if needed we can let the StorageKind be
a typedef for a templated type, like Sparse<short>, etc.
> Joel Falcou - Assistant Professor
> PARALL Team - LRI - Universite Paris Sud XI
> Tel : (+33)1 69 15 66 35