[eigen] efficient SoA with Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] efficient SoA with Eigen
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 9 Jun 2010 08:00:49 -0400
- 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=4gBnl3me/Nzh5BiSYAdBIhEe6MzFBTQahjMQsp2AasQ=; b=ZETvMVhJlCZCZhvcZENM3nG45bSoc9Xfp1w7T0yA3pPa8u0Yklav8+oRZ+KJof2wET 4tpl9gdmkAkUSOQ3o084qkgPGtyDfczugdykJhcixqRMnUToetwd1pOWmbOY63mXFeYS zyhfapR6LXm+aeVC9ugZB77Pdt+//VAmLb1+8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UImYuI0S/N+ukr6ZXzcFdEXiG4McF7r20tqm1RYSEhvJuKaaZcTgJnezuC4pS8UtRc LY6io2ChALQQ6z4L1SqOYUx1gvq/1nj88mAHwN34c0GleGBcR/qv3yj7wlv8EPFA4Pup i7bBUaFEY3kHYu6/d/0jb+L+uTDvfWhDxfRHo=
Hi,
the new Array class is usable as Scalar type, which is great, but we
have to make sure that doing so is efficient.
For example: Matrix<ArrayXf, 2, 2> m; m = m + m;
For now I have taken care of the math functions, so doing m = m.log()
is efficient, as m.log() returns a Matrix of log array expressions.
But as far as I understand (correct me Gael if I'm wrong) we still
have to do work for the above m = m+m example.
In the result xpr for m+m, we need to make the Scalar type be the
result type of ArrayXf+ArrayXf.
I amn't sure where is the best place to do so:
- in the CwiseBinaryOp xpr itself?
- in the operator+ ?
Didn't think too much about it, just wanted to make sure that we don't
overlook that.
Benoit