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

[ Thread Index | Date 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*: Wed, 12 May 2010 08:14:16 -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=6dyXc2+CW+ppxiO1W/11TL+ebXvq1sq3GopifElqkkI=; b=xb8bj6N6AjPDDWfDAlJU5BOOTY6Z5COI0p8shqCKTL9FRM24gBoR28Mc55w9SFgk5U XpyEaknSVZF4+/tfiP8h30Kvzw63TyP+tRLWSW/c7X93gs2OPfyBxRyMwo6zUA/5fpSg Q0QTMzdI6ju1d/mB8yck5WC9XluQ0dC9jjz3c=*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=oIzke0Ok7Tno4z3kCliMzMSepIYWQtbFLh9QRKMrHiI2DWy1Ho+VeP2dW4FJkRuJ85 ys/KjdhgreUQ4Tk8XPzPCcroVOmc0xE4DeXKTzTe4MdfGFo7DyGkVQ+0v5Wtw3ZN+baC 3N9AWzw6zcOF2mj+CV34vBk3SOz8n3QOtW064=

I've started doing these changes. I think that we only need to change runtime indices: for the template parameter indices, int should be good enough. That limits the amount of changes needed. See my current diff, in case you want to pick it up. Andrea: these changes will make it possible (even easy) to later add the ability for Sparse matrices to have a configurable Index type; but i'm not going to do this change myself as I have enough to do :) Benoit 2010/5/12 Andrea Arteaga <yo.eres@xxxxxxxxx>: > Just a word from my recent experience about sparse matrices: I think it > would be important to let the user decide the type of the indices. For dense > matrices it doesn't matter if the indices are signed or unsigned, 32 or 64 > bit, since the data structure does not contain data of this type (except for > two numbers for rows and cols); but sparse matrices have one array for data, > one for row indices and one for "column indices" (I'm talking about CRS > storage), i.e. two arrays are involved in this decision. > > I'm writing a library for interchanging data between C++ programs and > Matlab, and I'm providing support for Eigen and Boost::ublas. This kind of > problems are common in my work: having a template parameter to decide the > type of the indices would be very useful. > Andrea Arteaga

**Attachment:
diff**

**References**:**[eigen] Indexes: why signed instead of unsigned?***From:*Rui Maciel

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Mark Borgerding

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Rui Maciel

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Mark Borgerding

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Benoit Jacob

**Re: [eigen] Indexes: why signed instead of unsigned?***From:*Andrea Arteaga

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Implementing a gpuBlock type** - Next by Date:
**Re: [eigen] Indexes: why signed instead of unsigned?** - Previous by thread:
**Re: [eigen] Indexes: why signed instead of unsigned?** - Next by thread:
**Re: [eigen] Indexes: why signed instead of unsigned?**

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