MATLAB PARALLEL COMPUTING TOOLBOX - S Uživatelská příručka Strana 371

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 656
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 370
codistributed.build
11-27
% Distribute the matrix over the second dimension (columns),
% and let the codistributor derive the partition from the
% global size.
codistr = codistributor1d(2, ...
codistributor1d.unsetPartition, globalSize)
% On 4 workers, codistr.Partition equals [251, 250, 250, 250].
% Allocate storage for the local part.
localSize = [N, codistr.Partition(labindex)];
L = zeros(localSize);
% Use globalIndices to map the indices of the columns
% of the local part into the global column indices.
globalInd = codistr.globalIndices(2);
% On 4 workers, globalInd has the values:
% 1:251 on worker 1
% 252:501 on worker 2
% 502:751 on worker 3
% 752:1001 on worker 4
% Initialize the columns of the local part to
% the correct value.
for localCol = 1:length(globalInd)
globalCol = globalInd(localCol);
L(:, localCol) = globalCol;
end
D = codistributed.build(L, codistr)
end
See Also
codistributor1d | codistributor2dbc | gather | globalIndices |
getLocalPart | redistribute | size | subsasgn | subsref
Zobrazit stránku 370
1 2 ... 366 367 368 369 370 371 372 373 374 375 376 ... 655 656

Komentáře k této Příručce

Žádné komentáře

BONAIRE Durango Winter Cover Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Spülung BONAIRE Durango Winter Cover.
Wir stellen 1 PDF-Handbücher BONAIRE Durango Winter Cover zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Bedienungsanleitung






Weitere Produkte und Handbücher für Spülung BONAIRE

Modelle Dokumententyp
Ducted RAC Inverter Bedienungsanleitung   Bonaire Ducted RAC Inverter User Manual, 40 Seiten