Parfor + large input database for a function inside the loop
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
FaryTak
am 25 Jan. 2017
Kommentiert: FaryTak
am 26 Jan. 2017
Hey,
I am using parfor which loops over a function. That function has two very large dictionaries which I want to copy inside the workers for speed.
Testp = parallel.pool.Constant(Test);
Test = 1;
Testp = parallel.pool.Constant(Test);
parfor ab = 1:2
GG(ab,:) = example(Testp);
end
function [out] = example(Const)
out = Cons.Value;
end
This doen't work on my Matlab which has parallel and access to 5 cores on local. This is the error:
Undefined variable "parallel" or class "parallel.pool.Constant".
Any help?
Thank you, Fary
2 Kommentare
Akzeptierte Antwort
Walter Roberson
am 26 Jan. 2017
That facility was introduced in R2015b. Either upgrade or else look in the File Exchange for Worker Object Wrapper
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!