MATLAB で「parfor」ループをデバッグすることはできますか?
Afficher commentaires plus anciens
現在「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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 並列計算の基礎 dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!