Main Content

Distributed Arrays

Analyze big data sets in parallel using distributed arrays and simultaneous execution

Parallel Computing Toolbox™ supports distributed arrays to partition large arrays across multiple MATLAB® workers. You operate on the entire array as a single entity, however, workers operate only on their part of the array, and automatically transfer data between themselves when necessary. Simultaneous execution is supported by the single program multiple data (spmd) language construct to facilitate communication between workers. Use distributed-enabled matrix operations and functions to work directly with these arrays without further modification. You can use distributed arrays in Parallel Computing Toolbox to run big data applications using the combined memory of your cluster.


expand all

distributedCreate and access elements of distributed arrays from client
gatherTransfer distributed array, Composite object, or gpuArray object to local workspace
spmdExecute code in parallel on workers of parallel pool
CompositeCreate and access nondistributed variables on multiple workers from client
parallel.pool.ConstantBuild and use constant from data or function handle
redistributeRedistribute codistributed array with another distribution scheme
codistributedAccess elements of arrays distributed among workers in parallel pool
codistributor1d1-D distribution scheme for codistributed array
codistributor2dbc2-D block-cyclic distribution scheme for codistributed array
codistributed.buildCreate codistributed array from distributed data
forfor-loop over distributed range
getLocalPartLocal portion of codistributed array
globalIndicesGlobal indices for local part of codistributed array
spmdReduceReduce arrays on spmd workers (Since R2022b)
writeWrite distributed data to an output location
pagefunApply function to each page of distributed or GPU array


expand all

parallel.PoolParallel pool of workers

Examples and How To