This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Codistributor object for existing codistributed array


codist = getCodistributor(D)


codist = getCodistributor(D) returns the codistributor object of codistributed array D. Properties of the object are Dimension and Partition for 1-D distribution; and BlockSize, LabGrid, and Orientation for 2-D block cyclic distribution. For any one codistributed array, getCodistributor returns the same values on all workers. The returned codistributor object is complete, and therefore suitable as an input argument for


Get the codistributor object for a 1-D codistributed array that uses default distribution on 4 workers:

spmd (4)
    I1 = eye(64,codistributor1d());
    codist1 = getCodistributor(I1)
    dim     = codist1.Dimension
    partn   = codist1.Partition

Get the codistributor object for a 2-D block cyclic codistributed array that uses default distribution on 4 workers:

spmd (4)
    I2 = eye(128,codistributor2dbc());
    codist2 = getCodistributor(I2)
    blocksz = codist2.BlockSize
    partn   = codist2.LabGrid
    ornt    = codist2.Orientation

Demonstrate that these codistributor objects are complete:

spmd (4)

Introduced in R2009b

Was this topic helpful?