Application: Unblocked LU Factorization
Content |
Implement the unblocked LU factorization with partial pivoting and demonstrate on a small example that it works.
If you want: Develop your solution in an iterative process which is outlined in the following.
Setup a matrix
In main:
-
Use and initialize some variables for matrix dimensions and increments
-
Initialize a pointer for the first matrix element with dynamically allocated memory
-
Initialize the matrix with some values.
-
Print the matrix.
LU factorization without pivoting
Implement the LU factorization without pivoting:
-
Solve your example problem with pencil and paper
-
Setup a function for this
-
Copy and paste the BLAS functions needed
-
Implement the function
-
Make changes in main such that it print the matrix before and after the factorization.
-
Check your results.
You can subdivide the implementation of the LU factorization in even more steps.