Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned) |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Thu, 20 Aug 2009 09:45:34 -0400*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=fWYabsM7hedshag3jvgNbKrqAiBoTBjYOECnLFYVwrk=; b=dJjht6ZyY4yFzbPghDXAOCRT049Vk3NB52QudBDvigMFrwUIxU9EvQjtzuESJf0jdQ RTlN0UKSZv4tq1DX2VFpcXYvppvD31ZeZu5Hvi+OeoD/nl3ayghURXsLZl/I1llP2mUI Dl98oYLeZPXkEr0n9gmN4l5+qoMqgE4o9a51k=*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=IqiSFL6ZMXYYlKPQruVId2p7eze7ALwbFxt6Pvi+g70HPOi4YFVbe+RyATjIEi/z6q +R91RF0if+ZiLSPFaSYWQoBeYPhMptv/V2QDTCfpCDX2nIJtgDEwy9lUaQnCGe/pevlV L1C1BR7K67zFBLFBdkMeI1CsKEBNff/tybjU8=

2009/8/20 Rohit Garg <rpg.314@xxxxxxxxx>: > Hi, > > What is the state of eigen's support for small integers(16 bit, > signed/unsigned). I had a look at the branch over at bitbucket, and > there doesn't seem to be any small int specific patches in it. > > https://bitbucket.org/mihelich/eigen2/overview/ > > Any body care to comment on the state of this branch? Only Patrick can comment on his own branch;) > > If I need to add support for small ints to eigen, what do I need to > do? I need all bitwise ops, and yes, 16 bit*16 bit = 32 bit unsigned > integer multiplication (vectorized of course). Suggestions? First, read this, http://eigen.tuxfamily.org/dox/CustomizingEigen.html#CustomScalarType The two most important things are to edit the files NumTraits.h and MathFunctions.h in Core/. For vectorization, you'll have to edit the files in Core/arch/... at least Core/arch/SSE/PacketMath.h. Not sure about how it works for small ints (are there specific SSE instructions for e.g. adding two packets of 8 int16's ? you know better than me) For the bitwise ops, in the non-vector case i don't think you need to do anything special since operators & |... work natively; you can always check the Functors.h either in Core/ or in Array/ ; for vectorization I'm very optimistic too -- we already have ei_pand(), ei_por() etc in PacketMath.h and since for bitwise ops the integer size is irrelevant, you should be able to use that. > > BTW, are such features even welcome in eigen? Yes, most welcome. When I look at forums linking to our website, this is a frequently wanted feature. The fact that people on this list asked for it several times, finishes proving that it's a wanted feature. Vectorization is most welcome here too -- the prospect of 8x boosts on int16 and 16x boosts on int8 is very interesting... Benoit

**Follow-Ups**:**Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)***From:*Rohit Garg

**Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)***From:*Rohit Garg

**Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)***From:*Thomas Capricelli

**References**:

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Re: State of eigen support for small integers(16 bit, signed/unsigned)** - Next by Date:
**Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)** - Previous by thread:
**[eigen] Re: State of eigen support for small integers(16 bit, signed/unsigned)** - Next by thread:
**Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)**

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