Re: [eigen] sdgfdf |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] sdgfdf*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Mon, 2 Feb 2009 12:30:28 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tB5we3iwA1bd9J4GOuElAMrEXnr7pkP4dymKtOqvNCs=; b=xXq9woy1b2cicSn3PmAPCWs1R6Qb6WQjjneo77EJBgThTnTrUHVhrjWl7dEZqaNhTc 2CYW/HBdjBatinO0dRMPS7PPUfMmDYMWn0eiT5CzYtu8d71MtlaznaiHS2W7Ffxu5pvg 2HicJRBUSUbtCYfpfbQukl1AZtFgcHap4sI0c=*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:content-transfer-encoding; b=NkjsKhQTZrFUmVgG8EJsafe1jnOXNClWrH74TmECKn9WLApYa+Ve/AU3HX5yD6oNvX plrMfJRNv2bwOR1gWNQQ8UHMyNmetpIQzv57kaeFIXw0WNovimN+QUsC1TUceFZCcHJq rfbe7Lkq9vz0LY2tNGrpu/k0PUQAc2zAgOLOE=

Hi, 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. Gael. On Mon, Feb 2, 2009 at 10:50 AM, Jens Mueller <jens.k.mueller@xxxxxx> wrote: > Hi, > > storing sparse matrices efficiently is important. Eigen2 supports the > often used compressed sparse row/column format. What I find annoying is > that the type of the indices can't be specified. For dense matrices this > is perfectly valid. But let's say I have a sparse matrix with n > coefficients. With Eigen it boils down to having a value array of size n > with Scalar type and an int array of size n. Let's assume my index > would fit in a short that consumes 2 bytes compared to an 4 byte int. > Then this wastes 2n bytes. I'm working with large sparse matrices. From > my perspective I need to be very carefully using main memory. Further > storing the indices more compact should result in better cache > behaviour. Since I can fit more into the cache, i.e. reducing cache > misses. But I'm not very sure about this, since aligned memory is also > an issue. > The most obvious solution is to introduce template arguments to set the > types of the indices. > But I'm very unsure whether this is worse the trouble. Have you thought > about this issue yet? Any ideas? Or no problem at all? > > Regards, > Jens > > PS: > Thanks, Gael. I have seen the MappedSparseMatrix. I will try this out in > the near future. > > >

**Follow-Ups**:**Re: [eigen] sdgfdf***From:*Jens Mueller

**References**:**[eigen] sdgfdf***From:*Jens Mueller

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Code review for .resizeLike()** - Next by Date:
**Re: [eigen] sdgfdf** - Previous by thread:
**[eigen] sdgfdf** - Next by thread:
**Re: [eigen] sdgfdf**

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