|[eigen] Re: [Bf-committers] How about adding boost uBLAS library to blender/extern?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: bf-blender developers <bf-committers@xxxxxxxxxxx>
- Subject: [eigen] Re: [Bf-committers] How about adding boost uBLAS library to blender/extern?
- From: Keir Mierle <mierle@xxxxxxxxx>
- Date: Mon, 26 Jan 2009 13:17:49 -0800
- Cc: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- 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:cc:content-type :content-transfer-encoding; bh=QR6r6pLEa2Ab1X17OxI1ihUM7bCTorj2bCU+0MqS9Qc=; b=Phm5YkUa5JW2XAZ69TwUdUdnVHuXD/eXQWhq6STKBeSK4uHshFc8z2sT9TkMmFfVh9 AXInlLmSRNKQQ/ch1sx9guHDBItH1/RvSNPedZjhOsmBM2HZiy91r1TTTA0oECMLqY02 L8LRJE1Jlnczz+r0YTw3JMrIzcDot/xsN91QQ=
- 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 :cc:content-type:content-transfer-encoding; b=cYfE6jpjXegMvpwWHjDatbWlmjWYkf8ewHs1zF2NQYptGRRQKqNXTbf+zOn6BbpOir VDmMVDjAaoaHE5tVlfuRnCZ02WsVOzqCmlzgVVPxUgEXAhuEd748Ntsj76KRxx8El542 3M1RpSEwvzywvBneIBaLx5nLr5w4gZYSduefE=
Just to hop in: I have been using eigen2 for libmv for awhile. It's
*amazing*. They are beating Intel's MKL, Goto BLAS, and ATLAS on some
benchmarks, and with only 16,000 lines of code. The unification of
small fixed size vectors with dynamically sized ones makes your code
both easy to read and highly peformant (comparable to hand-optimized
For example, I have implemented levenberg marquart minimization in
Eigen, which is about the same length as my Python implementation, but
Also, you can do wacky things like
double z_offset = (R*t);
where R is a 3x3 matrix and t is a 3x1 vector. In this case, the
optimizer will peel away the unnecessary dot products and only compute
the dot product of the third row of R with t.
If you try to multiply matrices with mismatched sizes where any of the
dimensions are at compile time, you get nice compile errors like
Using eigen, most of the 'cruft' of writing numeric stuff at a low
level falls away.
I realize there are reasons not to use C++, but if anything, Eigen is
a compelling reason to use C++ if you are doing numeric coding. I
wouldn't go back to the old ways now that I've used Eigen (which is
more comparable to programming in matlab or numeric python than to
traditional C numerics).
Slides from a talk Benoit (primary Eigen author) gave last week:
On Sat, Jan 24, 2009 at 10:11 AM, Sebastian Skejø
> Have you looked at Eigen2? Not completely sure what you exactly want,
> but I think it should be able to do what you want and according to their
> benchmarks it outperforms uBlas.
> Sebastian Skejø
> On Fri, Jan 23, 2009 at 10:50:43PM +0100, Benoit Bolsee wrote:
> > Hi,
> > The new IK algorithms developed at the KUL use the uBLAS template
> > library from boost for matrix definition and operation.
> > In order to minimize code change when porting to Blender, I am asking if
> > it would be acceptable to add that library in blender/extern.
> > It is a template library, so it will not increase the size of the
> > executable more than necessary. It allows high level abstraction and yet
> > it is almost as fast as an add-hoc C implementation because it uses the
> > advanced technique of template expressions. The drawback is that it
> > requires a modern C compiler: gcc 3.2.3 and above, MSVC 7.1 and above,
> > ICC 8.0 and above (older compiler are supported with an earlier version
> > of the library). I guess this is not a limiting factor?
> > In terms of number of files, I extracted a subset of boost that contains
> > all the necessary files to compile uBLAS: 10Mb in 1650 files.
> > The alternative is to implement add-hoc C functions or reuse the TNT
> > template library that is used by IK_Solver (intern/iksolver/intern/TNT)..
> > This library is much smaller and provide similar functionality but it is
> > not as fast.
> > For the interested ones, I've started a wiki on the IK project:
> > http://wiki.blender.org/index.php/GameEngineDev/RobotIKSolver
> > /benoit
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers@xxxxxxxxxxx
> > http://lists.blender.org/mailman/listinfo/bf-committers
> Bf-committers mailing list