Saturday, April 27, 2024
HomeMatlabSwitching a parfor to a parfeval » Stuart’s MATLAB Movies

Switching a parfor to a parfeval » Stuart’s MATLAB Movies


I exploit parfor lots when processing massive quantities of knowledge. It may very well be on my native machine, or it may very well be on a distant cluster. It is rather easy to transform a for loop to a parfor loop and sometimes you don’t want to alter the code in your loop.

A parfor is environment friendly when the work required for every iteration is comparable, but when it’s not, then, close to the top of your loop, some staff can change into idle. That is the place parfevalwill be useful. It’s just a little extra sophisticated to make use of, however it would hold all staff busy till the work is completed. Because of this, it’s best to get your calculation completed sooner.

Right here I take a parfor loop in one in every of my present scripts, and try to convert it to make use of parfeval as an alternative.

Options coated on this code-along type video embody:

  • parfor
  • parfeval, FevalFuture

Play the video in full display screen mode for a greater viewing expertise. 



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments