MATLAB PARALLEL COMPUTING TOOLBOX - S Guide de l'utilisateur Page 123

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 656
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 122
Working with Codistributed Arrays
5-9
(local part) on each worker first, and then combine them into a single array that is
distributed across the workers.
This example creates a 4-by-250 variant array A on each of four workers and then uses
codistributor to distribute these segments across four workers, creating a 4-by-1000
codistributed array. Here is the variant array, A:
spmd
A = [1:250; 251:500; 501:750; 751:1000] + 250 * (labindex - 1);
end
WORKER 1 WORKER 2 WORKER 3
1 2 ... 250 | 251 252 ... 500 | 501 502 ... 750 | etc.
251 252 ... 500 | 501 502 ... 750 | 751 752 ...1000 | etc.
501 502 ... 750 | 751 752 ...1000 | 1001 1002 ...1250 | etc.
751 752 ...1000 | 1001 1002 ...1250 | 1251 1252 ...1500 | etc.
| | |
Now combine these segments into an array that is distributed by the first dimension
(rows). The array is now 16-by-250, with a 4-by-250 segment residing on each worker:
spmd
D = codistributed.build(A, codistributor1d(1,[4 4 4 4],[16 250]))
end
Lab 1:
This lab stores D(1:4,:).
LocalPart: [4x250 double]
Codistributor: [1x1 codistributor1d]
whos
Name Size Bytes Class
A 1x4 613 Composite
D 16x250 649 distributed
You could also use replicated arrays in the same fashion, if you wanted to create
a codistributed array whose segments were all identical to start with. See the
codistributed function reference page for syntax and usage information.
Using MATLAB Constructor Functions
MATLAB provides several array constructor functions that you can use to build
codistributed arrays of specific values, sizes, and classes. These functions operate in the
same way as their nondistributed counterparts in the MATLAB language, except that
they distribute the resultant array across the workers using the specified codistributor
object, codist.
Vue de la page 122
1 2 ... 118 119 120 121 122 123 124 125 126 127 128 ... 655 656

Commentaires sur ces manuels

Pas de commentaire

Sony SLT-A65VL Handbücher

Bedienungsanleitungen und Benutzerhandbücher für CD Spieler Sony SLT-A65VL.
Wir stellen PDF-Handbücher Sony SLT-A65VL zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung






Weitere Produkte und Handbücher für CD Spieler Sony

Modelle Dokumententyp
CDX-V58MP Bedienungsanleitung   Sony CDX-V58MP User's Manual, 4 Seiten
D-VJ85 Bedienungsanleitung   Sony D-VJ85 User manual, 36 Seiten
MDX-C8900R Bedienungsanleitung    Sony MDX-C8900R Manual de usuario, 186 Seiten
HDX266/HDX267W Bedienungsanleitung   Sony HDX266/HDX267W User's Manual, 104 Seiten
CDX-M10 Betriebsanleitung       Sony CDX-M10 Operating Instructions, 116 Seiten
MEX-BT2700 Bedienungsanleitung    Sony MEX-BT2700 User's Manual, 56 Seiten
CDP-M555ES Bedienungsanleitung   Sony CDP-M555ES User's Manual, 48 Seiten
CDX-M30 Bedienungsanleitung       Sony CDX-M30 User's Manual, 144 Seiten
D-E660 Bedienungsanleitung   Sony D-E660 User's Manual, 32 Seiten
D-MJ95 Bedienungsanleitung   Sony D-MJ95 User manual, 28 Seiten
D-F21 Bedienungsanleitung   Sony D-F21 User manual, 24 Seiten
D-E561 Bedienungsanleitung   Sony D-E561 User's Manual, 2 Seiten
CDX-434RF Bedienungsanleitung    Sony CDX-434RF User manual, 4 Seiten
CDP-CX335 Bedienungsanleitung    Sony CDP-CX335 User manual, 68 Seiten
D-E551 Bedienungsanleitung   Sony D-E555 User manual, 2 Seiten
CDX-C910 Bedienungsanleitung    Sony CDX-C910 User manual, 62 Seiten
HAR-D1000 Bedienungsanleitung   Sony HAR-D1000 User's Manual, 36 Seiten
CFD-360 Bedienungsanleitung    Sony CFD-360 User manual, 60 Seiten
D-SJ01 Bedienungsanleitung   Sony D-SJ01 User manual, 24 Seiten
CFD-577 Bedienungsanleitung   Sony CFD-577 User manual, 36 Seiten