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 23:26:40 +0530*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=+FssWgxwCPDvMyWhZGpyAras5gEVNL8Opu8jZ3jrZBg=; b=BE3ZX6GrMT3tufBfQMd8iC6hz/zRAeiLTWsx3MPhYd+J/TKdrTNbzdfHVo5xComJd0 JVZAqWZBbbWHPqxsG4RKpN3Nqz8yVsW8OPZAin7nsFP+f/adNhRXuBkVA7r6PCoWXKFy 48EUdwbNioVLyw04asOZdZcwwbNX1EY8JJLYQ=*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=KyQs67jTV+USsDsy9wa0M6bqnQ3YaAaYS+yPxQDkiszauY1LFa8AOZGiUbwGCzSA5A sl8qBbdZOiX4ji6L/JLUpoNyyWSP7h4jNhN6GVy+DCUCjAtYoL3B4STwkozhPBNNQDzl +7OjykZ4aOlfTpKRiuGrV+6GtYE12g7O2lSzs=

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

**Follow-Ups**:

**References**:**[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:*Benoit Jacob

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

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

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