- You cannot place a GLOBAL declaration directly inside a PARFOR loop
- The MATLAB workers executing the body of your PARFOR loop are separate MATLAB processes, and the values of global variables are not synchronised
does parfor support global variables?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to use global variables in the functions run in parallel using parfor. Is it possible?
0 Kommentare
Antworten (1)
Edric Ellis
am 26 Mär. 2012
There are two restrictions.
So, while you can use GLOBAL variables within functions called from the body of your PARFOR loop, they probably do not behave as you wish.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!