Skip to content

Add lartg to compute Givens/Jacobi rotations#18

Open
alecarraro wants to merge 1 commit into
NextLinearAlgebra:mainfrom
alecarraro:alecarraro/lartg
Open

Add lartg to compute Givens/Jacobi rotations#18
alecarraro wants to merge 1 commit into
NextLinearAlgebra:mainfrom
alecarraro:alecarraro/lartg

Conversation

@alecarraro
Copy link
Copy Markdown

Hi, last week I talked to @Rabab53 about implementing primitives for Jacobi SVD/Diagonalization methods in NextLA. As a first step in this direction I am adding lartg, to compute Givens/Jacobi rotations.

The implementation follows the safe-scaling algorithm by Anderson [1], which is also used in LAPACK. The function lartg is in fact meant to cover all four LAPACK xLartg variants [2]. I also added a small helper to compare the results against these.

LAPACK also implements the batched version, but I don't think it should be added here since it doesn't map well to GPU execution (as it would result in massive warp-divergence).

For testing, I haven’t added coverage across different backends, since this just a scalar-to-scalar primitive. Let me know if you'd prefer a different approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant