General MEX Implementation of Thomas' Algorithm

versión 2.7.0.2 (18.7 KB) por oreoman
MEX (C/C++) Implementation of Thomas Algorithm (or Tridiagonal Matrix Algorithm) for real and complex data.

71 descargas

Actualizada 10 Mar 2020

De GitHub

Ver licencia en GitHub

MLDIVIDE has a great tridiagonal matrix solver for sparse matrices, and there are other implementations of Thomas' algorithm out there (see below), but I needed a faster way to solve tridiagonal systems for complex data; this seems to do the trick. On my system (and R2018b), this is about four times faster than MLDIVIDE or a straight up implementation in MATLAB.

This does use interleaved complex numbers with AVX instructions for complex operations, so to compile for use just put it on your path, type "mex -R2018a 'CFLAGS=-mavx' tdma.c" and it should work.

For a MEX implementation that works on REAL data, please see:
https://www.mathworks.com/matlabcentral/fileexchange/38640-implementation-of-thomas-algorithm--mex

For a MATLAB implementation that works on all data, please see:
https://www.mathworks.com/matlabcentral/fileexchange/40722-tridiag-m

Citar como

oreoman (2022). General MEX Implementation of Thomas' Algorithm (https://github.com/michael-nix/MATLAB-MEX-Thomas-Algorithm), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2018b
Compatible con la versión R2018a y siguientes
Compatibilidad con las plataformas
Windows macOS Linux
Agradecimientos

Inspirado por: Implementation of Thomas algorithm, mex, tridiag.m

Community Treasure Hunt

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

Start Hunting!
Para consultar o informar de algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o informar de algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.