If gpu computing or convert to mex file help to accelerate the code
1 次查看(过去 30 天)
显示 更早的评论
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.
![](/matlabcentral/answers/uploaded_files/115086/C3D27E6A-1413-4A64-B10F-3199B3692935.png)
0 个评论
采纳的回答
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!