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

조회 수: 5 (최근 30일)
Jonathan
Jonathan 2025년 5월 7일
답변: Manish 2025년 5월 12일
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?

답변 (1개)

Manish
Manish 2025년 5월 12일
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!

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by