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

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


I have been adding stuff for both short and unsigned short so far.
Mainly because I need right shifts for unsigned shorts, which are
logical bit shifts, instead of algebraic bit shifts. I turns out that
there are a few missing intrinsics in sse2, as usual, for signed and
unsigned stuff. So it will perhaps be easier to just do short instead
of unsigned short too. There is no unsigned int in eigen for instance.

But since I need, unsigned shorts, I propose, that we offer both
algebraic, logical bit shifting as a template parameter option.
Comments?

On Thu, Aug 20, 2009 at 8:12 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> 2009/8/20 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>> In data giovedì 20 agosto 2009 15:45:34, Benoit Jacob ha scritto:
>>> 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...
>>
>> I'm quite curious : why would people need 8-bit or 16-bit integers nowadays ?
>> I can only think of embedded platforms, but that does not seem to be the
>> matter here, is it ?
>
> Actually it is the matter for many Eigen users! And I believe that was
> brought up in an earlier discussion on small int types.
>
>> Or is it for the speed ? kind of ... trading precsion for
>> speed, that's it ?
>
> If you can replace int32 by int8, then not only you divide memory
> usage by 4, but if you have vectorization then you can also multiply
> the speed by 4, as 16 int8's fit in a single packet of 128 bits. That
> makes small ints attractive on any platform where we have
> vectorization, regardless of memory usage.
>
> 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/