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

[ Thread Index | Date Index | More Archives ]

2009/8/21 Rohit Garg <rpg.314@xxxxxxxxx>:
> On Fri, Aug 21, 2009 at 1:38 AM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
>> OK, let me try to put all my answers in 1 mail:
> Thanks. This mail was really helpful.
> The problem with bit shifts is there can be two type of bit shifts.
> a) scalar bit shift. All elements are shifted by the same amount in
> the same direction and manner. So the second operand is a scalar.
> b) vector bit shift. All elements are shifted by different amounts, as
> specified using another vector. So the second operand is a matrix of
> the same size.
> AFAIK, using SSEx, there is no way of doing (b). The best you can do
> is by looping over scalars. I am interested in (a), which is supported
> by SSE2. .cwise() always takes a matrix/vector parameter, afaik.

..cwise() applies to a MatrixBase, which in the case of a unary
operation is the matrix/vector to which the operation is applied.

Then a cwise operation may take another argument, but that's something
that the cwise class itself doesn't see!

For example: when you do a.cwise().pow(n), it is "a" which is the
argument passed to the Cwise constructor. "n" isn't seen at all by the
Cwise class itself, it is just passed to the Cwise::pow() method in
class Cwise.

Then you have a slight difference as pow() isn't vectorized.


Mail converted by MHonArc 2.6.19+