Main Content

distributed

Access elements of distributed arrays from client

Constructor

distributed

You can also create adistributedobject using some MATLAB®functions by specifying adistributedoutput. The following table lists the available MATLAB functions that can createdistributedobjects directly. For more information, see the Extended Capabilities section of the function reference page.

eye(___,"distributed") distributed.cell
false(___,"distributed") distibuted.colon
Inf(___,"distributed") distributed.linspace
NaN(___,"distributed") distributed.logspace
ones(___,"distributed") distributed.spalloc
true(___,"distributed") distributed.speye
zeros(___,"distributed") distributed.sprand
rand(___,"distributed") distributed.sprandn
randi(___,"distributed")
randn(___,"distributed")

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 insidespmdstatements are accessible as distributed arrays from the client.

Use thegatherfunction to retrieve distributed arrays into the client work space.

Methods

classUnderlying (Not recommended) Class of elements within gpuArray or distributed array
distributed.cell Create distributed cell array
distributed.spalloc Allocate space for sparse distributed matrix
distributed.speye Create distributed sparse identity matrix
distributed.sprand Create distributed sparse array of uniformly distributed pseudo-random values
distributed.sprandn Create distributed sparse array of normally distributed pseudo-random values
gather Transfer distributed array, Composite array or gpuArray to local workspace
isaUnderlying (Not recommended) True if distributed array's underlying elements are of specified class
isdistributed True for distributed array
write Write distributed data to an output location

The methods for distributed arrays are too numerous to list here. Most resemble and behave the same as built-in MATLAB functions. See运行MATLAB函数与分布式阵列.

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

Function Description
isdistributed Indication if array is distributed
isreal Indication if array elements are real
isUnderlyingType Determine if underlying data in the array is of specified type
length Length of vector or largest array dimension
ndims Number of dimensions in the array
size Size of array dimensions
underlyingType Class (data type) of the underlying data in the array

Version History

Introduced in R2008a