Re: [eigen] Small dynamic matrix optimization

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


This is already done for some temporaries (like blocks in cache-optimized GEMM). Doing that for custom types would be interesting, but not trivial (e.g., move-behavior is completely different, if you want to move the data to an object higher in the stack).

If you are ok with managing data yourself, you can manually achieve this by alloca/allocate-ing data yourself and use an Eigen::Map to refer to the data.

If you have a proof-of-concept how this could be integrated into the Eigen API, we are open for suggestions!

Another idea would be to allow custom allocators for matrices -- in that case the custom allocator could very easily be a stack-allocator (which would not even need to use the "main" stack). But that's also not too easy to integrate without breaking the current API (adding a new type would of course be an option for that).

Cheers,
Christoph



On 21/10/2019 15.39, Rob Conde wrote:
I'm wondering if a small dynamic matrix optimization has been considered. In other words, allowing a stack allocation for matrices of unknown size up to a certain limit and using a heap allocation beyond that?

Rob Conde


--
 Dr.-Ing. Christoph Hertzberg

 Besuchsadresse der Nebengeschäftsstelle:
 DFKI GmbH
 Robotics Innovation Center
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Postadresse der Hauptgeschäftsstelle Standort Bremen:
 DFKI GmbH
 Robotics Innovation Center
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Tel.:     +49 421 178 45-4021
 Zentrale: +49 421 178 45-0
 E-Mail:   christoph.hertzberg@xxxxxxx

 Weitere Informationen: http://www.dfki.de/robotik
  -------------------------------------------------------------
  Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
  Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany

  Geschäftsführung:
  Prof. Dr. Jana Koehler (Vorsitzende)
  Dr. Walter Olthoff

  Vorsitzender des Aufsichtsrats:
  Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  -------------------------------------------------------------




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