If gpu computing or convert to mex file help to accelerate the code

1 ビュー (過去 30 日間)
Chaoyang Jiang
Chaoyang Jiang 2018 年 4 月 28 日
コメント済み: Chaoyang Jiang 2018 年 5 月 1 日

Attached is the profiling results of my code, where the most time-consuming lines are those from build-in functions(e.g., find, max, min,...). As my code cannot be vectorized or run in parallel, I am wondering how to speed up the code? If gpu computing or convert to mex file help for this case?

Thank you very much.

採用された回答

Joss Knight
Joss Knight 2018 年 4 月 29 日
It doesn't look as though the problem is the speed of execution of those functions, so much as the number of times they are called. You should have a go at removing your loops by vectorizing your code.
  1 件のコメント
Chaoyang Jiang
Chaoyang Jiang 2018 年 5 月 1 日
Thanks a lot for your answer!

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by