开发者

Matlab multiple cores

开发者 https://www.devze.com 2023-02-04 17:29 出处:网络
I\'m running an algorithm that\'s taking a lot of resources, and maxes out the CPU. The probl开发者_运维问答em is that it\'s only using one CPU.

I'm running an algorithm that's taking a lot of resources, and maxes out the CPU.

The probl开发者_运维问答em is that it's only using one CPU.

How can i make MATLAB multithread the computations and use more than 1 CPU ?


Unless you specifically use parallel constructs -- that is, using explicit parallelism -- or use built-in functions that have already been parallelized for you -- Matlab will not run faster on a multicore machine. This post has a list of built-in functions that have been parallelized and so will take advantage of multiple cores:

http://www.walkingrandomly.com/?p=1894

Here's an example of using a parallel construct to roll your own parallelism:

http://www.mathworks.com/matlabcentral/fileexchange/13775


The settings are at:

File>Preferences>General>Multithreading in R2007a or newer

Affected functions are described at:

Which MATLAB functions benefit from multithreading

0

精彩评论

暂无评论...
验证码 换一张
取 消