Documentation Center

  • Trial Software
  • Product Updates

distributed

Access elements of distributed arrays from client

Constructor

distributed

You can also create a distributed array explicitly from the client with any of several overloaded MATLAB functions.

eye(___,'distributed')rand(___,'distributed')
false(___,'distributed')randi(___,'distributed')
Inf(___,'distributed')randn(___,'distributed')
NaN(___,'distributed')distributed.cell
ones(___,'distributed')distributed.spalloc
true(___,'distributed')distributed.speye
zeros(___,'distributed')distributed.sprand
 distributed.sprandn

Description

Distributed arrays represent those arrays which are partitioned out among the workers in a parallel pool. A distributed array resembles a normal MATLAB array in the way you index and manipulate its elements, but none of its elements exists on the client.

Codistributed arrays that you create inside spmd statements are accessible as distributed arrays from the client.

Use the gather function to retrieve distributed arrays into the client work space.

Methods

classUnderlyingClass of elements within gpuArray or distributed array
distributed.cellCreate distributed cell array
distributed.spallocAllocate space for sparse distributed matrix
distributed.speyeCreate distributed sparse identity matrix
distributed.sprandCreate distributed sparse array of uniformly distributed pseudo-random values
distributed.sprandnCreate distributed sparse array of normally distributed pseudo-random values
eyeIdentity matrix
falseArray of logical 0 (false)
gatherTransfer distributed array data or gpuArray to local workspace
InfArray of infinity
isaUnderlyingTrue if distributed array's underlying elements are of specified class
isdistributedTrue for distributed array
NaNArray of Not-a-Numbers
onesArray of ones
randArray of rand values
randiArray of random integers
randnArray of randn values
sparseCreate sparse distributed or codistributed matrix
trueArray of logical 1 (true)
zerosArray of zeros

The overloaded methods for distributed arrays are too numerous to list here. Most resemble and behave the same as built-in MATLAB functions. See MATLAB Functions on Distributed and Codistributed Arrays.

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

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

Was this topic helpful?