Reputation: 16045
Is there a way to do some profiling to check which part of my code uses several thread?
I have a matlab code, where I run it, I can see on the system monitor that several cores are used. But I cannot figure out which part of the code is multi-threaded...
I wonder if the profiler can find it out, or some other tool...
Upvotes: 5
Views: 656
Reputation: 5915
A round about way, is to search for known multi-threaded functions. Here's the best list I know of for that: http://www.walkingrandomly.com/?p=1894. Also note that operations like, a.*b, or sin(a) will be multi-threaded if a and/or b are large enough matrices.
You can also use the profiler to reduce your search space. If most of your code is running multi-threaded most of the time, then wherever your code is spending time the most is likely where the multi-threading is occurring....
Upvotes: 6