필터 지우기
필터 지우기

What is going on when I call a function that uses parfor loop inside of a parfor loop in my main script?

조회 수: 1 (최근 30일)
I have a parfor loop in my main script, and in it I am calling a function that itself uses a parfor loop. To my suprise, everything still works. However, aren't I technically using an embedded parfor loop? I am curious why it is working. I should add I am not super versed with the parallel processing toolkit, I am using it to speed up some processes. I'd appreciate any information, thank you. Also, I am using R2022a.
parfor i = 1:numAgents
d = MaxDist(g_,g_bar);
...
end

답변 (1개)

Raymond Norris
Raymond Norris 2022년 5월 27일
The outer parfor-loop is parallelized and the inner parfor-loop is run as a for-loop.

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by