MATLAB で「parfor」ループをデバッグすることはできますか?
Ältere Kommentare anzeigen
現在「parfor」ループをデバッグするには「for」ループ内で「parfor」ループの重複コードを維持する必要があります。どのループを実行するかを決定するために、if 文を使用して parpool の存在を検出しています。コードを重複させずにこれを行う方法はありますか?
if ~isempty(gcp('nocreate'))
parfor ii=1:length(caseInputs)
myCodeStatements
end
else
for ii=1:length(caseInputs)
myCodeStatements % same code as above, I'd like to eliminate this
end
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 並列計算の基礎 finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!