Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clarification of the leading dimension in CUBLAS when transposing

Tags:

For a matrix A, the documentation only states that the corresponding leading dimension parameter lda refers to the:

leading dimension of two-dimensional array used to store the matrix A

Thus I presume this is just the number of rows of A given CUBLAS' column major storage format. However, when we consider Op(A), what does the leading dimension refer to now?

like image 741
mchen Avatar asked May 04 '13 17:05

mchen


1 Answers

Nothing changes. The leading dimension always refers to the length of the first dimension of the array. The data order flags (normal, transpose, conjugate) only indicate to BLAS how the data within the array is stored. They have no effect on the array itself, which is always column major ordered and requires an LDA value for indexing in 2D.

So whether the matrix data is stored in transposed form or not, an m x n array always has LDA>=m.

like image 81
talonmies Avatar answered Sep 28 '22 02:09

talonmies