フィルターのクリア

spmd-parfor

1 回表示 (過去 30 日間)
oblivious
oblivious 2012 年 5 月 31 日
Hello,
i am trying to use PCT for a large for loop which uses a large data set used in ultrasound medical imaging. the loop run faster when spmd is used but takes more time than the original one when parfor is used. Again for some of my codes parfor is fater
is there any rule of thumb regarding the use of spmd or parfor?
-OBLI

回答 (1 件)

Jill Reese
Jill Reese 2012 年 5 月 31 日
Generally speaking, spmd is used when you need communication to occur between workers in the matlabpool. Another difference is that labindex provides the index of each worker in the pool when used within spmd. In parfor, labindex is always 1 because parfor is intended only for independent tasks.
It is hard to comment on why your specific large data loop was faster with spmd than parfor without seeing a snippet of code. If you could post details about the operations in question then maybe we can identify where the bottleneck is.

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by