Build a mex file from a complicated m-file.

1 回表示 (過去 30 日間)
Jongwoo Lee
Jongwoo Lee 2015 年 7 月 24 日
コメント済み: Ryan Livingston 2015 年 7 月 29 日
I have a heavy m-file with around 50,000 lines (~5000 kb). I need to call this function hundreds of times and each function call takes a few seconds. I tried to convert this function into a mex file to reduce computing time, but I am not quite sure whether codegen supports conversion of such a large script. Any comment is welcomed!
Jongwoo

採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 24 日
I wouldn't recommend that to start. Altering code properly for code generation takes a fair bit of time. It would be more productive to profile the code first, find out where the slow parts of it are and see if you can recode them, possibly including moving just the slowest parts to mex.
  5 件のコメント
Jongwoo Lee
Jongwoo Lee 2015 年 7 月 29 日
I don't see .mexw64 file in the directory. I see error: "error building mex function" in the error report, without any details. I will try your suggestions and give feedback here. Thank you!
Ryan Livingston
Ryan Livingston 2015 年 7 月 29 日
In the report, you can click on the "Build Log" tab. It should show any compiler errors if that is where the error happened.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBuild Configuration についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by