|[eigen] Optimization for special complex operations|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Optimization for special complex operations
- From: Carlos Becker <carlosbecker@xxxxxxxxx>
- Date: Mon, 16 Aug 2010 14:16:34 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=ejlbfKJmG79e3VwecM3nB+148lnfjTonPWWNur/vigw=; b=UZYoDbW2EVbLjiNrZPYrGj6hjabCY+vXVXdWdZ94Hir/t3ektsJxd0iYuUVcJGbiDX HkB6lpFk7cT5KTIh6jXnBXCOT6ciIzKAFbtpvEBDRKSTSljK4G9rHb0uyrh6SR+fKb2p 15l9UFKA6dDmKYob/lB8gaQACRqjt/8l1csWo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Us5EGR95fY9+Wc/vadwehjp1DbGYtVbZLoFvj3qRfK6w2wYM5HK9H2uqRgWZr8R7Em 60DBQQyQNckS+2jxXGueOy+7M45M4qnk3WNloCrrHdWZuh7wEs2rIr4S8XfwiCg04FqJ j+Azr3gi5mL8cla9YAQfe/IvR6C9kAlEAfZt8=
Hi everyone again. Lately I've been using Eigen with complex numbers to calculate things such as calculating the maximum of the real part or imaginary part of a certain vector. I suppose that trying to take the real part and then use maxCoeff() or minCoeff() would create a possible unnecessary temporary.
Another thing is to be able to do something like:
xx = nn.colwise().normalized();
Here there are two very different concepts:
- I guess there could be some special functions, in this case only for complex numbers, to be able to perform some special optimizations. I remember we were talking a bit about a special case with Gael on the chat channel.
- Regarding the .normalized() snippet above, I know I am breaking reduction rules, since I am expecting xx and nn to be of the same size in the end. However, I don't know how much is lost if this normalization is done manually with, for instance, a for loop.
Does this make sense? I would like to work on these but I don't want to introduce code that would not make sense or break rules. I only have a small insight of what eigen looks like inside.