lapack
lapack copied to clipboard
gbmv leaves result uninitialized for zero column matrix
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.
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
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.