matlab-basic

1 vue (au cours des 30 derniers jours)
Rakesh Praveen
Rakesh Praveen le 21 Nov 2011
hi,
does matlab program inside a if loop always executed sequentially ?
  3 commentaires
Sean de Wolski
Sean de Wolski le 21 Nov 2011
If you tell it to!
Walter Roberson
Walter Roberson le 8 Déc 2011
There is no such thing as an if loop.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 21 Nov 2011
No, the Just In Time (JIT) compiler can end up reordering some portions of the code.
  1 commentaire
Jan
Jan le 21 Nov 2011
Reordering does not mean, that the program is not executed sequentially. The parallelized functions like FILTER, MIN, SUM etc will process the data with multiple threads. On the processor level a branch prediction is applied also.
Therefore I agree with Walter and add the argument, that "sequential execution" is not exactly defined on modern processors.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by