MATLAB PARALLEL COMPUTING TOOLBOX - S Guida Utente Pagina 611

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 610
randn
11-267
Create Codistributed Randn Matrix
Create a 1000-by-1000 codistributed double matrix of randn values, distributed by its
second dimension (columns).
spmd(4)
C = randn(1000,'codistributed');
end
With four workers, each worker contains a 1000-by-250 local piece of C.
Create a 1000-by-1000 codistributed single matrix of randn values, distributed by its
columns.
spmd(4)
codist = codistributor('1d',2,100*[1:numlabs]);
C = randn(1000,1000,'single',codist);
end
Each worker contains a 100-by-labindex local piece of C.
Create gpuArray Rand Matrix
Create a 1000-by-1000 gpuArray of randn values with underlying class double:
G = randn(1000,'double','gpuArray');
See Also
randn | rand | randi | codistributed.sprandn | distributed.sprandn
Vedere la pagina 610
1 2 ... 606 607 608 609 610 611 612 613 614 615 616 ... 655 656

Commenti su questo manuale

Nessun commento