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

  • 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 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
Vue de la page 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 655 656

Commentaires sur ces manuels

Pas de commentaire