Skip to content

gbmv leaves result uninitialized for zero column matrix #248

Closed

Description

@amigalemming

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.

Activity

  1. langou commented on Apr 24, 2018

    @langou
    Contributor

    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

  2. amigalemming commented on Apr 24, 2018

    @amigalemming
    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.
    
  3. reopened this on Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions