GEMM: Allocate memory for blocks only once

Submitted by Gael Guennebaud @ggael

Assigned to Nobody

Link to original bugzilla bug (#1364)

Description

Currently, for large enough matrices we dynamically allocate memory for the blocks for each call. With C++11 it should be possible to allocate only once at the first call in a thread safe manner. Of course, we would keep the current strategy as fallback for non C++11 builds.

Some questions through:

  • shall we allocate for the maximal block size? This would be a waste of memory if the user only deal with, say, 50x50 matrices (blocks are much larger!)

  • how to properly release the memory?

Depends on

#1568

Edited by Eigen Bugzilla