MATLAB PARALLEL COMPUTING TOOLBOX - S Betriebsanweisung Seite 553

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 656
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 552
ones
11-209
Examples
Create Distributed Ones Matrix
Create a 1000-by-1000 distributed array of ones with underlying class double:
D = ones(1000,'distributed');
Create Codistributed Ones Matrix
Create a 1000-by-1000 codistributed double matrix of ones, distributed by its second
dimension (columns).
spmd(4)
C = ones(1000,'codistributed');
end
With four workers, each worker contains a 1000-by-250 local piece of C.
Create a 1000-by-1000 codistributed uint16 matrix of ones, distributed by its columns.
spmd(4)
codist = codistributor('1d',2,100*[1:numlabs]);
C = ones(1000,1000,'uint16',codist);
end
Each worker contains a 100-by-labindex local piece of C.
Create gpuArray Ones Matrix
Create a 1000-by-1000 gpuArray of ones with underlying class uint32:
G = ones(1000,'uint32','gpuArray');
See Also
eye | false | Inf | NaN | ones | true | zeros
Seitenansicht 552
1 2 ... 548 549 550 551 552 553 554 555 556 557 558 ... 655 656

Kommentare zu diesen Handbüchern

Keine Kommentare