Re: [eigen] [PATCH] ParialRedux count() |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [PATCH] ParialRedux count()
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 24 Jan 2009 16:25:33 +0100
- 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=ws2urD5LYV6dhCgeb9LkUCikJiDl2RUeL+ngyrO0JsE=; b=vLqTWuYpTrKjt7CjK39hIMc0bXPj3NJYD/9xdIdNw48sR+cj9m/S5mkwQHyCcOq9z2 0eKG5kypeZJRTZGDeNYnPxtAIxg4kYGAw9Is8hLv6qsBXyejJs8dADflc05IAnM3JJhk 8VG9EPGdB4YYo98z6ji3hBQDKV88ceaim79YM=
- 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=OzOg7Pegglnvnh6R+wMpxo0XGkvf/AGEpgTxdXTvDwZTG3RnRcooTVOzkVGSSxKLCR 6p//xHcy8nitclw5hHa/JoquDvdA4jPRkopmp8Iyn2nZfOSXjBsioMM4HRs+jTORNUHq JNhj/UUd6iYM1bRm9Yl5bZSN9AGsyF248NIIs=
Hi,
thanks a lot, I adapted a bit your patch (rev 916097), no need to have
a second EIGEN_MEMBER_FUNCTOR_RETURNTYPE macro. About the cost of
cast, here I assume it is zero because in 99% cases count is applied
on a matrix of bool, and casting a bool to a 0/1 integer cost nothing
(at least currently).
gael.
On Sat, Jan 24, 2009 at 1:27 PM, Ricard Marxer Piñón
<email@xxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I have added count() to PartialRedux. Attached is the patch which also
> includes a snippet for the doc.
>
> When telling the cost of the operator I have simplified a bit and implied
> that the casts to bool and int (which are in the count() method in
> BooleanRedux.h) are always necessary, I think this needs reviews.
>
> PS: if you think of other easy tasks i could tackle, I would be happy to do
> it, that way I will get more familiarized with Eigen internals.
>
> --
> ricard
> http://www.ricardmarxer.com
> http://www.caligraft.com
>