|[eigen] Vectorized Hamming distance|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Vectorized Hamming distance
- From: rodrigo benenson <rodrigo.benenson@xxxxxxxxx>
- Date: Wed, 25 Nov 2009 12:37:42 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=J17pR0Wavdbahwe0/0AMLkOChmWBzZL6Mlh2HUu2+0A=; b=V7uPF0KX8REoVxT8505stSxjqlVUcjSfq1TcA0OaLW0kb55SkR/EOoMHKVVuyw/0NT HTOCL1gF/jgtv3VixY5bo0Z4XJZFzU7o2suupfauNsGSs5k+D6rw1l2NHg4/5sk4azSm czMa/59M4etI1pNCAD3p/2ZLZT5BpN4P7agLg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=SGRcaiSgnmtGy1OtF+4UXBP7niFKb4hOGJ5hU6edoNxpp8ZaxRg7fi4E9+1BLaiBaW fjtMpWxqHt0GVeNFfyDFHRCltQjXvPVrWFPfJM6cS3vv4g9aHNxpmLhbwbaRYM/OuXkb RB6TxGT5kPYjClanrGzpBckpYuPaTaQzVqFP0=
I would like to use the Eigen librabry to write a vectorized (using
SIMD instruction) version of the Hamming Distance between two
Matrix<int, N, 1>.
(following the spirit of Benoît Jacob's "Eigen2 as a vectorization
library" blog post)
The hamming distance consists on doing XOR between two vectors and
then counting the number of bits in the resulting vector.
Any suggestion on how to do this ?
Why is it that Eigen does not support boolean operations on int data types ?
Anyone has tried something similar before ?