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

  • 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 604
rand
11-261
Create Codistributed Rand Matrix
Create a 1000-by-1000 codistributed double matrix of rands, distributed by its second
dimension (columns).
spmd(4)
C = rand(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 rands, distributed by its columns.
spmd(4)
codist = codistributor('1d',2,100*[1:numlabs]);
C = rand(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 rands with underlying class double:
G = rand(1000,'double','gpuArray');
See Also
rand | randi | randn | codistributed.sprand | distributed.sprand
Zobrazit stránku 604
1 2 ... 600 601 602 603 604 605 606 607 608 609 610 ... 655 656

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

Žádné komentáře