ABSTRACT

MATLAB contains very powerful internal mechanisms that enable code to run much faster by automatically parallelizing arithmetic and logical operations on data. This is called implicit (automatic) parallelization,706 since we do not need to explicitly tell MATLAB to parallelize the operations; MATLAB does it auto-magically when we pass vectorized (nonscalar) data to most built-in functions, using multithreading.*

Implicit parallelization relies on the fact that many loops have iterations that are independent of each other, and can therefore be processed in parallel with little effort (this is called pleasingly or embarrassingly parallel tasks).707 As a design goal, MATLAB implicitly parallelized whatever fits this model, and enables users to easily annotate loops for explicit parallelization using minimal effort (see Chapter 6).708