Re: [eigen] sdgfdf

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


> >> yes this is something I've thought about, there is no difficulty.
> >> Actually my initial concern was rather about "int" which could be too
> >> small if n > 2^32, so I'll make the types of both "index pointers" and
> >> "coordinate" template parameters. Note that with "unsigned short" for
> >> the coordinate type, you are limited to 65k x 65k matrices, that is
> >> not very large.
> >
> > Can't I have different types for each coordinate index, i.e. short for
> > columns and int for rows? Don't know, if I'm getting your unsigned short
> > example right. In my case, only one coordinate index fits into unsigned
> > short. The other one should be int.
> 
> right, the compressed storage is not symmetric, so if you have a
> col-major matrix you could use int for the column index and short for
> the row index but not the other way round. Eventually, I think that's
> probably a lot of trouble for minor benefits:
>  - this would complexify operators (matrix product, transposition,
> submatrices, etc.),
>  - the memory gain would be x0.75 for float and x0.83 for double only,
>  - honestly, I don't expect any performance improvement,
>  - I don't think other libs are able to handle short type for indices,
> so you would not be able to use your matrix with the solvers.

In summary, CompressedStorage's member m_indices should be a pointer of
a type that is passed as a template parameter. SparseMatrix's member
m_outerIndex could be a template parameter as well to support more than
2^32 entries in CompressedStorage. 2^32 gives you about 4*10^9 many
entries. This is sufficient for me. But maybe others need more
coefficients. Right?

Regards,
Jens



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