matlab-basic

조회 수: 1 (최근 30일)
Rakesh Praveen
Rakesh Praveen 2011년 11월 21일
hi,
does matlab program inside a if loop always executed sequentially ?
  댓글 수: 3
Sean de Wolski
Sean de Wolski 2011년 11월 21일
If you tell it to!
Walter Roberson
Walter Roberson 2011년 12월 8일
There is no such thing as an if loop.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2011년 11월 21일
No, the Just In Time (JIT) compiler can end up reordering some portions of the code.
  댓글 수: 1
Jan
Jan 2011년 11월 21일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by