matlab-basic

1 visualización (últimos 30 días)
Rakesh Praveen
Rakesh Praveen el 21 de Nov. de 2011
hi,
does matlab program inside a if loop always executed sequentially ?
  3 comentarios
Sean de Wolski
Sean de Wolski el 21 de Nov. de 2011
If you tell it to!
Walter Roberson
Walter Roberson el 8 de Dic. de 2011
There is no such thing as an if loop.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Nov. de 2011
No, the Just In Time (JIT) compiler can end up reordering some portions of the code.
  1 comentario
Jan
Jan el 21 de Nov. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by