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

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


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
>
>
>



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