Skip to content

Comments

Fix xGESVDQ's jobu and jobv support in LAPACKE#1146

Open
yizeyi18 wants to merge 1 commit intoReference-LAPACK:masterfrom
yizeyi18:xgesvdq-more-jobuv
Open

Fix xGESVDQ's jobu and jobv support in LAPACKE#1146
yizeyi18 wants to merge 1 commit intoReference-LAPACK:masterfrom
yizeyi18:xgesvdq-more-jobuv

Conversation

@yizeyi18
Copy link

Description
LAPACKE provides interface to xGESVDQ, although not included in DOCS/lapacke.pdf . In the implementation of the interface, jobu and jobv are treated as the same as in xGESVD, causing "U", "R", "F" variant of jobu and "V", "R" variant of jobv not handled.
This PR appends support of these variant of jobu and jobv in LAPACKE's interface to xGESVDQ.

For not founding the way to edit DOCS/lapacke.pdf, the documentation remains unchanged.
Checklist

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

@yizeyi18 yizeyi18 changed the title fix xGESVDQ's jobu and jobv support in lapacke Fix xGESVDQ's jobu and jobv support in LAPACKE Jul 14, 2025
Copy link
Collaborator

@angsch angsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the missing job options are good catch

lapack_int nrows_v = API_SUFFIX(LAPACKE_lsame)( jobv, 'a' ) ? n :
( API_SUFFIX(LAPACKE_lsame)( jobv, 's' ) ? MIN(m,n) : 1);
( (API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ||
API_SUFFIX(LAPACKE_lsame)( jobu, 'u' ) ) ? MIN(m,n) : 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't jobu = 'f' and jobu = 'r' be included here too?

goto exit_level_0;
}
if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ) {
if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the jobu = 'a', 's', 'u', 'r', 'f' conditional is repeated several times, it may be worth to declare an ancillary variable to wrap the status. An analogous comment applies to jobv.

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.

2 participants