Re: [eigen] Announcement of CG libs

[ Thread Index | Date Index | More Archives ]

That's awesome, Gael.

On the topic of _javascript_ code (hence the Web) not being able to use Eigen, I would like to draw the attention of people on this list on recent developments around trans-compiling C/C++ code to _javascript_. This is somewhat of a shameless plug, as these projects are being developed by Mozilla engineers, but I think it's fair enough to mention that here.

The project to watch is Emscripten,

This is a LLVM-based compiler that will take any C/C++ project (really any language with a LLVM front-end) and compile it to _javascript_. It works by representing the entire heap as a single JS Typed Array. Various usual libraries and frameworks are specially handled. For example, OpenGL 1.x and 2.x calls are converted into WebGL calls.

So you can actually code in C++ with Eigen, and compile to the Web, today.

For now that only gives 10%--20% of native speed, on non-vectorized code; certain less on vectorized code like Eigen code.

But a project, asm.js, is under way to fix that:

This is a subset of standard _javascript_, so any "asm.js"-enabled code will readily run in any existing browser. But this subset, contrary to general JS, is strongly optimizable, allowing the JS compiler to generate high-performance code when it sees asm.js constructs. It already gives 50%--70% of native speed on real code. SIMD is not handled yet, but probably falls into the scope of what could be solved by asm.js eventually.

Anyway, you can start using C++ and Eigen and target the Web, and be confident that any performance issues are being worked on.


2013/3/19 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
A course on Eigen will be given at CG libs [1]: Smart Libraries for
Computer Graphics , held in Pisa, June 3-5.

CG Libs is a great initiative organized by the Eurographics Italian
chapter. Six open source libraries, including Eigen, will be deeply
presented. It is interesting to notice that except SpiderGL that is
written in _javascript_, all others use or have support for Eigen:

- vcglib (
- Point Cloud Library (
- ViennaCL (
- g2o (
- MeshLab (



Mail converted by MHonArc 2.6.19+