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

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


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.
>>
>> Benoit
>>
>
> 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.

Benoit

>
> --
> ___________________________________________
> Joel Falcou - Assistant Professor
> PARALL Team - LRI - Universite Paris Sud XI
> Tel : (+33)1 69 15 66 35
>
>
>
>
>



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