|Re: [eigen] State of eigen support for small integers(16 bit, signed/unsigned)|
[ Thread 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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 21 Aug 2009 10:59:00 -0400
- 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=dkHENYdmJNQDHEC6IAca4ZVgKzd0eA51Au2ghD5YPXE=; b=SUxJwGc5eoKPriPh6FGiyAaAojK6j5NtOCv1aVJCtfhlstpGKrlkKcplU82PZF9L3M c5n5Ta6M/eJjmBUPVlcEkiEp1A6g4isDfflwIlri8AUPEVeWp5VW0oDUAo0cmzn5wTbN nNN99gyNta75WszD5Mkt9thlMT6uooYcwWrBw=
- 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=RUP1bAjaZcjKcK2zKbD2z+9dk1nHg6CQBsG7zqiEUgXoE0rFCwctB2YuxsMRVs1SYt PAe90nrjws38S0bjchXOvBXlAnauQzkc3syoXAl4P6XYQZAvt34A3ROXaWPajtkJ+IB7 FVLAZlNnoJHNw1dlOtXIMSnOfcsj7I+ydjnns=
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
Then you have a slight difference as pow() isn't vectorized.