Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gbmv leaves result uninitialized for zero column matrix #248

Closed
amigalemming opened this issue Apr 24, 2018 · 2 comments · Fixed by #843
Closed

gbmv leaves result uninitialized for zero column matrix #248

amigalemming opened this issue Apr 24, 2018 · 2 comments · Fixed by #843

Comments

@amigalemming
Copy link

amigalemming commented Apr 24, 2018

SGBMV(TRANS='N',M=5,N=0,KL=0,KU=0,ALPHA=1,A,LDA=1,X,INCX=1,BETA=0,Y,INCY=1)

This should fill Y with zeros but actually it leaves it uninitialized. Encountered in BLAS-3.6.0.

@langou
Copy link
Contributor

langou commented Apr 24, 2018

Per specification, if N=0, the SGBMV routine exits immediately without referencing their vector or matrix arguments. So if N=0, you should not expect Y to be filled with zeros. More information at: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=5&t=4196&p=10026

@langou langou closed this as completed Apr 24, 2018
@amigalemming
Copy link
Author

It seems that the documentation is contradictory in this respect. The parameter description of sgbmv says:

When BETA is supplied as zero then Y need not be set on input.

and

On exit, Y is overwritten by the updated vector y.

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 a pull request may close this issue.

2 participants