This repo contain implementation of Given's rotation method to solve linear system. https://algowiki-project.org/en/Givens_method. I tried to optimize this method by enhanced use of CPU cache. This was achieved by operating with matrix blocks that fit in the cache.
- Launch CMake in directory with source file, example :
cmake . .
- Launch Make in directory with source file, example :
make
./QR_solver Matrix_size Block_size Print_size Formula_type (File_name)
Matrix_size
- size of square matrixBlock_size
- size of matrix's block (to best performance use 50-100)Print_size
- Maximum of matrix's columns\rows to print.Formula_type
- Formula to initialize matrix without file.File_name
- Optional argument, needed to initialize matrix by data from file. Formula_type should be set to 0 iff using initialization by file.
- 1: A_ij = Matrix_size - max(i,j) + 1
- 2: A_ij = max(i,j)
- 3: A_ij = |i - j|
- 3: A_ij = 1 / (i + j - 1)