| Parallel Computing Toolbox™ | ![]() |
D = codistributed(L)
D = codistributed(L, dist)
D = codistributed(L, D1)
D = codistributed(X, 'convert')
D = codistributed(X, dist, 'convert')
D = codistributed(X, dist, lab, 'convert')
D = codistributed(L) forms a codistributed array with localPart(D) = L. The codistributed array D is created as if you had concatenated all the local L's together. The distribution scheme of D is specified by the default codistributor object.
D = codistributed(L, dist) forms a codistributed array with the distribution scheme specified by dist.
D = codistributed(L, D1) forms a codistributed array with the same distribution scheme as that of codistributed array D1.
D = codistributed(X, 'convert') distributes a replicated X using the default codistributor. X must be a replicated array, that is, it must have the same value on all labs. size(D) is the same as size(X).
D = codistributed(X, dist, 'convert') distributes a replicated X using the codistributor dist. X must be a replicated array, namely it must have the same value on all labs. size(D) is the same as size(X).
D = codistributed(X, dist, lab, 'convert') distributes a local array X that resides on the lab identified by lab, using the codistributor dist. Local array X must be defined on all labs, but only the value from lab is used to construct D. size(D) is the same as size(X).
gather essentially performs the inverse of codistributed(..., 'convert').
Create a 3-dimensional array with distribution dimension 2 (i.e., by columns) and partition scheme [1 2 1 2 ...].
if mod(labindex, 2)
L = rand(2,1,4)
else
L = rand(2,2,4)
end
A = codistributed(L, codistributor())On four labs, create a 20-by-5 codistributed array A, distributed by rows (over its first dimension) with an even partition scheme.
L = magic(5) + labindex;
dim = 1;
A = codistributed(L, codistributor('1d', dim));The dim input to codistributor is required here to override the default distribution dimension.
codistributor, defaultPartition, gather
![]() | codcolon | codistributor | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |