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: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 21 Aug 2009 15:32:24 +0200
- 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=3NubeXQffG9Yx08vwpArYH7xJRpispA0G1ERAAJgqVA=; b=in2WzLmO7zxmpn4YFLjWW7iq6KWWl3L62YBN/yiUkpZWAK7iTHlhXd7AT0nOPKhiMA XPetuLyxz2rD44Bu4rKq0mZHaRK6A1tIWmzKH4VbgwnJFCqoBaMvg81pYCE2l3NuOYmv CK/Ifog4cV6f9Ip1vP8UTMX1GvZ2YaJ7f7vUw=
- 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=nDE1Hz5/MZZ9xP+KLp9vtCROUr7JvtycVOg2eYeUGJjnVO6BLuUMg5tmsd1udyUOZu LJkWAFvKS3doej4CDQnmw63IiTwTAhTYf/y3UmWMEQD5p2mKPaoz1McFmnKcIsHFo8vz AOSep8JgN7iOW1FMMpa2Uw20VGhNZwnvs4STk=
On Fri, Aug 21, 2009 at 2:34 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> 2009/8/21 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>> one more information, if you want the coeff wise product of two int16
>> returns a int32, you can simply add the specialization:
>>
>> template<> struct ei_scalar_product_traits<int16,int16> { typedef
>> int32 ReturnType; };
>>
>> Also for the vectorization I think there is no other choice than using
>> structs instead of typdefs for the PacketXX SSE types because we need
>> to distinguish, e.g.:
>>
>> ei_padd(Packet4i,Packet4i)
>>
>> and
>>
>> ei_padd(Packet8s,Packet8s)
>>
>> so here Packet4i and Packet8s *must* be different types.
>
> Depends: in the other solution, this is remedied by making ei_padd
> template in the scalar type, so the first is the specialization for
> int and the second is the specialization for short.
hm actually we must have both ei_padd<float>(float,float) and
ei_padd<Packet4f>(Packet4f,Packet4f) so I don't think solution (a)
could work.
> But yes that becomes a little cumbersome, that's what i meant when i
> said that if that solution is too cumbersome then prefer the other.
>
> Benoit
>
>
>