Matlab Coding in C++ with forest is very long and consumes it in RAM

5 visualizzazioni (ultimi 30 giorni)
We try to generate c++ library from Matlab functions with random forest inside.
We run code generation on 2,4ghz cpu and 60 Go RAM.
Our 3 forests size (50-120Mo).
The library generation duration is 3 hours and it use 60go RAM.
The other library code generation duration are a few minutes (without random forest of course).
My questions :
Do you have similar codegen duration with random forest? Same question with RAM usage?
Do you have tricks to speed up code generation and decrease RAM usage?

Risposte (1)

Manish
Manish il 12 Mag 2025
Hi,
Regarding the query, "Do you have tricks to speed up code generation and decrease RAM usage?":
You can use the 'compact' function to reduce the size of the model.
Refer to the documentation below for more information:
Additionally, please refer to the following documentation for steps to increase code generation speed:
Hope this helps!

Categorie

Scopri di più su MATLAB Coder in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by