Programmatically check type of parpool
조회 수: 9 (최근 30일)
이전 댓글 표시
How can I check programmatically whether an existing parallel pool is thread-based or process-based?
댓글 수: 2
채택된 답변
Meg Noah
2025년 8월 8일
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)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!