Перераспределите codistributed массив с другой схемой распределения
D2 = redistribute(D1,codist)
D2 = redistribute(D1,codist) перераспределяет codistributed массив D1 и возвращает D2 использование схемы распределения задано codistributor объект codist.
Перераспределите массив согласно схеме распределения другого массива.
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
codistributed | codistributor | codistributor1d.defaultPartition