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

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


> 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



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