How can I adjust the number of threads for functions based on fftw?
조회 수: 3 (최근 30일)
이전 댓글 표시
As far as I know, embadded matlab function 'dct' is based on fftw library, and it supports 'Thread-based Environment'.
And I noticed MATLAB proccess automatically use CPU about ~1000% when I use dct function, in thread-based parallel environment, without any other instruction.
How can the function decide the proper number of threads in fft ?
Can I set the number of threads manually to improve the performance?
Thanks.
댓글 수: 0
답변 (1개)
Angelo Yeo
2024년 2월 15일
You can determine the maximum number of threads with the function "maxNumCompThreads".
See the doc below for more information.
댓글 수: 2
Angelo Yeo
2024년 2월 15일
@현탁 박: Would you try to set the number of workers for thread environment with the following commands?
numWorkers = 2;
parpool("Threads", numWorkers)
Note that this feature was introduced from R2022b, and details can be found in the link below.
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!