Access elements of arrays distributed among workers in parallel pool



You can also create a codistributed array explicitly from spmd code or a communicating job task with any of several MATLAB functions.



Arrays partitioned among the workers in a pool, are accessible from the workers as codistributed array objects.

Codistributed arrays on workers that you create inside spmd statements or from within task functions of communicating jobs can be accessed as distributed arrays on the client.


InfArray of infinity
NaNArray of Not-a-Numbers
classUnderlyingClass of elements within gpuArray or distributed array
codistributed.cellCreate codistributed cell array
codistributed.colonDistributed colon operation
codistributed.spallocAllocate space for sparse codistributed matrix
codistributed.speyeCreate codistributed sparse identity matrix
codistributed.sprandCreate codistributed sparse array of uniformly distributed pseudo-random values
codistributed.sprandnCreate codistributed sparse array of uniformly distributed pseudo-random values
eyeIdentity matrix
falseArray of logical 0 (false)
gatherTransfer distributed array or gpuArray to local workspace
getCodistributorCodistributor object for existing codistributed array
getLocalPartLocal portion of codistributed array
globalIndicesGlobal indices for local part of codistributed array
isaUnderlyingTrue if distributed array's underlying elements are of specified class
iscodistributedTrue for codistributed array
onesArray of ones
randArray of rand values
randiArray of random integers
randnArray of randn values
redistributeRedistribute codistributed array with another distribution scheme
sparseCreate sparse distributed or codistributed matrix
trueArray of logical 1 (true)
zerosArray of zeros

The methods for codistributed arrays are too numerous to list here. Most resemble and behave the same as built-in MATLAB functions. See Run MATLAB Functions with Distributed Arrays.

Also among the methods there are several for examining the characteristics of the array itself. Most behave like the MATLAB functions of the same name:

classUnderlyingClass (data type) of the elements in the array
iscodistributedIndication if array is codistributed
isrealIndication if array elements are real
lengthLength of vector or largest array dimension
ndimsNumber of dimensions in the array
sizeSize of array dimensions

Introduced in R2008b