
How can I generate MATLAB Coder code that does not use tbb libraries?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 30 Avr 2020
Réponse apportée : MathWorks Support Team
le 19 Mai 2020
I'm using MATLAB coder for generating C++ code. I see that MATLAB uses several libraries (dlls and libs) like:
libmwmorphop_binary_tbb.lib
libmwbwlookup_tbb.lib
Which is any library in the following format: libmw*_tbb.lib or libmw*_tbb.dll.
Due to an overall system performance, I'd like to generate code that does not_* *_depend on the "tbb" libraries.
Réponse acceptée
MathWorks Support Team
le 30 Avr 2020
tbb libraries, or "thread build blocks", are used for parallel programming. In this case to disable dependency for these libraries, you can launch MATLAB with the startup flag -singleCompThread
(<https://www.mathworks.com/help/matlab/ref/matlabwindows.html#buklxlz-3>)
After doing so, verify that you're in single thread mode at the MATLAB command line:
>> maxNumCompThreads
ans =
1
Once you've done this, you can proceed with your normal MATLAB Coder workflow (e.g. the MATLAB Coder App or using the "codegen" function at the command line). Then, use the "packNGo" function to zip up the generated code and dependencies. In single thread mode, you will no longer see dependencies on "tbb" libraries. See below for an example where single thread mode has no "tbb" dependency:

0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!