Re: [eigen] Matrix product avoiding heap allocation

[ Thread Index | Date Index | More Archives ]

On 21.01.2014 11:48, Ricard Marxer wrote:
I'm trying to perform a c=a*b matrix product avoiding heap allocations.
I have tried both Eigen dev and latest stable.

Dynamic sized products are separated into blocks and each block is temporarily copied into a block variable, which should reside on the stack. Apparently either your OS does not support alloca, or (more likely) Eigen does not detect that it is supported. Your program works fine on my Laptop (Linux, 32bit, GCC4.7 and with clang 3.1).

You seem to be using MacOS. Can you say what the macro EIGEN_ALLOCA is expanded to? I assume Qt-Creator directly shows that, otherwise:

#include <Eigen/Core>
#include <iostream>
#define STR(X) STR_I(X)
#define STR_I(X) #X

int main(){
	std::cout << STR(EIGEN_ALLOCA);

Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252

Mail converted by MHonArc 2.6.19+