Using vector instructions of the x86-64 microprocessor in linear algebra problems

Authors

DOI:

https://doi.org/10.15330/itee.2025.2.04

Keywords:

x86-64 microprocessor, computing technologies, NASM assembler, vector instructions, Jordan-Gauss method.

Abstract

The paper shows the use of AVX vector instructions when solving linear algebra problems. Algorithms and a library of functions in the NASM assembly language have been developed for vector arithmetic operations (addition, multiplication) and solving systems of linear equations using the Jordan-Gauss method.

The performance of the developed programs using vector SIMD and scalar SISD technologies when solving systems of linear algebraic equations of different dimensions has been compared. According to the results of the experiments, the calculation speedup is obtained from 5 to 6 times when using AVX vector instructions.

References

C. Xie, H. Wu, and J. Zhou, “Vectorization Programming Based on HR DSP Using SIMD,” Electronics, vol. 12, no. 13, p. 2922, Jul. 2023. doi: https://doi.org/10.3390/electronics12132922.

Intel® Intrinsics Guide: Instruction set. URL: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html?utm_source=chatgpt.com#.

Kusswurm D. Modern Parallel Programming with C++ and Assembly Language: X86 SIMD Development Using AVX, AVX2, and AVX-512 / D. Kusswurm. New York : Apress, 2022. 580 p. URL: https://www.oreilly.com/library/view/modern-parallel-programming/9781484279182/.

M. Costanzo, E. Rucci, M. Naiouf, and A. D. Giusti, “Performance vs Programming Effort between Rust and C on Multicore Architectures: Case Study in N-Body,” in 2021 XLVII Latin Amer. Comput. Conf. (CLEI), Cartago, Costa Rica, Oct. 25–29, 2021. IEEE, 2021. doi: https://doi.org/10.1109/clei53233.2021.9640225.

P. E. de Vilhena, O. Lahav, V. Vafeiadis, and A. Raad, “Extending the C/C++ Memory Model with Inline Assembly,” Proc. ACM Program. Lang., vol. 8, OOPSLA2, pp. 1081–1107, Oct. 2024. doi: https://doi.org/10.1145/3689749.

M. Rigger, S. Marr, S. Kell, D. Leopoldseder, and H. Mössenböck, “An Analysis of x86-64 Inline Assembly in C Programs,” in VEE '18: 14th ACM SIGPLAN/SIGOPS Int. Conf. Virtual Execution Environ., Williamsburg VA USA. New York, NY, USA: ACM, 2018. doi: https://doi.org/10.1145/3186411.3186418.

K. Papagiannopoulos, “Low Randomness Masking and Shuffling: An Evaluation Using Mutual Information,” IACR Trans. Cryptographic Hardware Embedded Syst., pp. 524–546, Aug. 2018. doi: https://doi.org/10.46586/tches.v2018.i3.524-546.

D. Salomon and I. Levi, “MaskSIMD-lib: on the performance gap of a generic C optimized assembly and wide vector extensions for masked software with an Ascon-p test case,” J. Cryptographic Eng., May 2023. doi: https://doi.org/10.1007/s13389-023-00322-4.

NASM - The Netwide Assembler. URL: https://www.nasm.us.

“Microsoft Macro Assembler reference.” Microsoft Learn: Build skills that open doors in your career. URL: https://learn.microsoft.com/uk-ua/cpp/assembler/masm/microsoft-macro-assembler-reference?view=msvc-170.

GAS - the GNU assembler. URL: https://www.gnu.org/software/binutils/.

B. Adeleye and S. M. Jiddah, “Analysis of Parallel Architectures: SIMD, tightly-coupled MIMD, and loosely-coupled MIMD,” Int. J. Comput. Trends Technol., vol. 53, no. 1, pp. 6–8, Nov. 2017. doi: https://doi.org/10.14445/22312803/ijctt-v53p102.

L. Bobrowski and C. Boldak, “Stepwise Inversion of Large Matrices with the Gauss-Jordan Vector Transformation,” J. Advances Math. Comput. Sci., pp. 28–39, Jan. 2022. doi: https://doi.org/10.9734/jamcs/2022/v37i130429.

P. S. Stanimirović and M. D. Petković, “Gauss–Jordan elimination method for computing outer inverses,” Appl. Math. Computation, vol. 219, no. 9, pp. 4667–4679, Jan. 2013. doi: https://doi.org/10.1016/j.amc.2012.10.081.

K. Goto and R. A. v. d. Geijn, “Anatomy of high-performance matrix multiplication,” ACM Trans. Math. Softw., vol. 34, no. 3, pp. 1–25, May 2008. doi: https://doi.org/10.1145/1356052.1356053

T. B. Schardl, W. S. Moses, and C. E. Leiserson, “Tapir,” in PPoPP '17: 22nd ACM SIGPLAN Symp. Princ. Pract. Parallel Program., Austin Texas USA. New York, NY, USA: ACM, 2017. doi: https://doi.org/10.1145/3018743.3018758.

Published

2025-06-27

How to Cite

Holota, V.I., et al. “Using Vector Instructions of the x86-64 Microprocessor in Linear Algebra Problems”. Information Technologies and Engineering Electronics, no. 2, June 2025, pp. 33-43, doi:10.15330/itee.2025.2.04.