MATLAB PARALLEL COMPUTING TOOLBOX - S Guida Utente Pagina 50

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 49
2 Parallel for-Loops (parfor)
2-22
x = zeros(10,12);
parfor idx = 1:12
x(:,idx) = idx;
end
The following code offers a suggested workaround for this limitation.
x = zeros(10,12);
parfor idx = 1:12
x(:,idx) = repmat(idx,10,1);
end
Global and Persistent Variables
The body of a parfor-loop cannot contain global or persistent variable declarations.
More About
“parfor Limitations” on page 2-11
“Classification of Variables in parfor-Loops” on page 2-23
Vedere la pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 655 656

Commenti su questo manuale

Nessun commento