Which MATLAB functions benefit from multithreaded computation?

조회 수: 91 (최근 30일)
I have a machine that has multiple processors or cores. I would like to know what MATLAB functions I can expect to speed up as a result of using the multiple CPUs.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2013년 6월 26일
As of MATLAB 7.4 (R2007a), MATLAB supports multithreaded computation for a number of functions and expressions that are combinations of element-wise functions (e.g. y=4*x*(sin(x) + x^3)). These functions automatically execute on multiple threads and you do not need to explicitly specify commands to create threads in your code.
For a function or expression to execute faster (speed up) on multiple cores, the following conditions must be true:
1) The operations in the algorithm carried out by the function are easily partitioned into sections that can be executed concurrently, and with little communication or few sequential operations required. This is the case for all element-wise operations.
2) The data size is large enough so that any advantages of concurrent execution outweigh the time required to partition the data and manage separate execution threads. For example, most functions speed up only when the array is greater than several thousand elements.
3) The operation is not memory-bound where the processing time is dominated by memory access time, as is the case for simple operations such as element-wise addition. As a general rule, more complex functions speed up better than simple functions.
The following functions include multithreaded implementations as of MATLAB 7.14 (R2012a); this list is not exhaustive, and other MATLAB functions may be multithreaded by virtue of being implemented atop the functions listed below. Also note that multithread implementations may not apply to all arguments combinations and data types/shapes/sizes. Functions are listed here in the order they appear in the MATLAB documentation.
MATHEMATICS
Arrays and matrices
•Basic information: ISFINITE, ISINF, ISNAN, MAX, MIN
•Operators: +, -, .*, ./, .\, .^, *, ^, \ (MLDIVIDE), / (MRDIVIDE)
•Array operations: PROD, SUM
•Array manipulation: BSXFUN, SORT
Linear algebra
•Matrix Analysis: DET, RCOND
•Linear Equations: CHOL, INV, LDL, LINSOLVE, LU, QR
•Eigenvalues and singular values: EIG, HESS, SCHUR, SVD, QZ
Elementary math
•Trigonometric: ATAN2, COS, CSC, HYPOT, SEC, SIN, TAN, including variants for radians, degrees, hyperbolics, and inverses.
•Exponential: EXP, POW2, SQRT
•Complex: ABS
•Rounding and remainder: CEIL, FIX, FLOOR, MOD, REM, ROUND
•LOG, LOG2, LOG10, LOG1P, EXPM1, SIGN, BITAND, BITOR, BITXOR
Special Functions
•ERF, ERFC, ERFCINV, ERFCX, ERFINV, GAMMA, GAMMALN
Data Analysis
•CONV2, FILTER, FFT and IFFT of multiple columns or long vectors, FFTN, IFFTN
  댓글 수: 2
Royi Avital
Royi Avital 2014년 4월 8일
Any updates on this list?
Andrew Janke
Andrew Janke 2022년 2월 21일
Any chance for an updated list of mulithreaded/multicore-supporting Matlab functions, now that we're up to R2021b?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by