gonum / blas

A BLAS implementation for Go [DEPRECATED]
172 stars 16 forks source link

Incorrect matrix length check for Dtrsm #58

Closed btracey closed 9 years ago

btracey commented 9 years ago

In Dtrsm, the size of a is checked assuming it is either an m x n or an n x m matrix. However, this is incorrect. If it is on the left, a is an m x m matrix, and if it is on the right, a is an n x n matrix.

Changing the lines to if s == blas.Left { if lda(m-1)+m > len(a) || lda < max(1, m) { panic("cblas: index of a out of range") } } else { if lda(n-1)+n > len(a) || lda < max(1, n) { panic("cblas: index of a out of range") } }

fixes the problem.

kortschak commented 9 years ago

This is #51, fixed by #52.