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*: Rohit Garg <rpg.314@xxxxxxxxx>*Date*: Thu, 20 Aug 2009 07:10:03 -0700*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=QEa9joN2OWQZ1Qh3oVy4pZ2oa6bRU0ZH5ADTBNsOubM=; b=bqA3LUoGhbB6KquIwVmA0mXQBzUQ3rO8ge8bZInm6gGWwziP4v2MNh3fXYeNV9ZwKy esvVak1XsDjUHVlmJiuqnnxMtK6ZRAdOofCnoEBy5SpRSYsX1eY9e/zIo+Fnc3EZh/Pc xg7Tk37IMm8NavTYU5n5p2wcA4o0CAzM2KvYo=*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=EB+ml+JekzOY9gUYJytyYZ6y4u89L3vwZ+64Iro2JNAQ0J8ekUSQ8w+e+zKjyI81/w +mX1fKvrqiAe+HHQVLSl/qQS6BgrxwaWAiGAWTjlJzPg1AVkVe4Oc9B1qG4MAgRW4H5G Ngl2v6QJPOe561E0GEpzLhxIxsouBE8wI7b7E=

> 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) I had a look at that file. But it doesn't mention anything about the vectorization. So how is that handled? Somewhere, eigen will have to be told that operation on multiple of 8 can be vectorized and so on. Also I don't understand the point of editing the NumTraits file. How does that help? > > 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 > > > -- Rohit Garg http://rpg-314.blogspot.com/ Senior Undergraduate Department of Physics Indian Institute of Technology Bombay

**Follow-Ups**:

**References**:

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] 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:
**Re: [eigen] 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/ |