Main Content

redistribute

別の分散スキームにより対話型分散配列を再分散する

構文

D2 = redistribute(D1,codist)

説明

D2 = redistribute(D1,codist) は対話型分散配列 D1 を再分散し、codistributor オブジェクト codist で定義された分散スキームを使用して D2 を返します。

別の配列の分散スキームに従って、配列を再分散します。

spmd
  % First, create a magic square distributed by columns:
    M = codistributed(magic(10),codistributor1d(2,[1 2 3 4]));

  % Create a pascal matrix distributed by rows (first dimension):
    P = codistributed(pascal(10),codistributor1d(1));

  % Redistribute the pascal matrix according to the 
  % distribution (partition) scheme of the magic square:
    R = redistribute(P,getCodistributor(M));
end

バージョン履歴

R2006b で導入