[Bf-committers] How about adding boost uBLAS library to blender/extern?

Benoit Bolsee benoit.bolsee at online.be
Mon Jan 26 10:13:42 CET 2009

Wow, Eigen2 seems a excellent choice: it has automatic SIMD and cache
friendly optimization, it provides out of the box SVD decomposition, it
is a pure math library and thus is much smaller than boost::ublas. 
The only drawback it seems is that it is still a beta package and it
requires a recent compiler: MSVC 2005 and up (MSVC 2008 for SSE
optimization), gcc 3.3 and up (gcc 4 for SIMD optimization), recent ICC
(9? 10?, 11?).
However, current version is beta6, API is stable for dense matrices, it
is already used by many projects and available as a package in various
Linux distributions.
Following the discussion on IRC, it seems a better choice to put it in
/lib rather than in extern: no need to duplicate in branches, Linux
users still have the choice to install the package (installing the
package is only required for compilation, there is no runtime
I will seriously consider using Eigen2 in the IK project.


> On Sat, 24 Jan 2009 19:11:20 +0100, Sebastian Skej wrote
> 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. 
> http://eigen.tuxfamily.org 
> http://eigen.tuxfamily.org/index.php?title=Benchmark
> 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
> > 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
> > 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

More information about the Bf-committers mailing list