Difference between revisions of "LU Decomposition"

From NaplesPU Documentation
Jump to: navigation, search
Line 31: Line 31:
  
 
[[File:pseudocode.png|center]]
 
[[File:pseudocode.png|center]]
 +
 +
 +
= nu+ Optimization =

Revision as of 18:59, 2 February 2018


Summary

LU Decomposition is an example of how to use Nu+ features to optimize an algorithm, using multithreaded and vectorial code.

Reusable code decomposition and multithreaded and vectorial optimization methods are shown; they can be applied to every other parallelizable algorithm, from image processing to machine learning ones.

Algorithm Description

LU Decomposition is used in solving systems of linear equations

Ax=b.png

Algorithm decomposes A in:

  • U.png upper triangolar matrix
  • L.png lower triangolar matrix

Partial Pivoting

Partial pivoting is an optimization of standard LU Decomposition that aims to reduce numerical instability

  • Therefore a matrix P.png is needed to keep track of pivoting operations
  • Partial because pivoting is applied on rows only

These matrices have to verify the relation:


PA=LU.png

Pseudocode

Pseudocode.png


nu+ Optimization