Main Content

getCodistributor

既存の対話型分散配列の対話型分散オブジェクト

構文

codist = getCodistributor(D)

説明

codist = getCodistributor(D) は、対話型分散配列 D の対話型分散オブジェクトを返します。オブジェクトのプロパティは、1 次元の分散では Dimension および Partition、2 次元ブロック サイクリック分散では BlockSizeLabGrid および Orientation です。どの対話型分散配列に対しても、getCodistributor はすべてのワーカー上で同じ値を返します。返される対話型分散オブジェクトは完全なものであるため、codistributed.build の入力引数として適しています。

4 つのワーカーで既定の分散を使用する 1 次元対話型分散配列の対話型分散オブジェクトを取得します。

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

4 つのワーカーで既定の分散を使用する 2 次元ブロック サイクリック対話型分散配列の対話型分散オブジェクトを取得します。

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

これらの対話型分散オブジェクトが完全なものであることを示します。

spmd (4)
    isComplete(codist1)
    isComplete(codist2)
end

バージョン履歴

R2009b で導入