[eigen] Custom memory allocation for SparseMatrix?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I'm using Eigen 3.2 on a STM32F7 arm mcu. Quite successfully so far!

The memory on this device is separated into two parts, where there is some Tightly-Coupled Memory (64k) that we use for the stack and statically initialized variables. This memory is significantly faster to use compared with the normal memory.

I want to use a sparse matrix for a calculation. As far as I can see SparseMatrix uses regular memory allocation from the heap (new/delete). In my case, this uses the regular "slow" memory. It runs ok, but I know there is much gain in using the DTCM memory..

Is there some trivial way to make SparseMatrix use a custom allocator? I guess one alternative is to modify my version of Eigen so that the CompressedStorage class does something else than normal, but it would be nice not having to modify Eigen itself.

Best regards,
Ola Røer Thorsen




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/