Programmatically check type of parpool
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matthias Wurm
am 8 Aug. 2025
Kommentiert: Matthias Wurm
am 11 Aug. 2025
How can I check programmatically whether an existing parallel pool is thread-based or process-based?
2 Kommentare
Akzeptierte Antwort
Meg Noah
am 8 Aug. 2025
delete(gcp('nocreate'))
pool = parpool('Threads')
class(pool)
% test of whether or not pool is a thread parallel pool
contains(class(pool), 'parallel.ThreadPool')
opts = parforOptions(pool)
class(opts.Pool)
% test for whether or not pool is a Thread pool
contains(class(opts.Pool), 'parallel.ThreadPool')
% check to see if the same methods in pool are inherited from ThreadPool
methods(pool)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Parallel Computing Fundamentals 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!