CUBLAS multiplication with a diagonal matrix

Hello,

Does CUBLAS has any matrix-matrix multiplication routines which are optimized for the case where one of the matrices in a diagonal (as opposed to triangular) matrix.

Saleem

It doesn’t. but then again neither does the standard netlib blas. With diagonal matrices, multiplication reduces to the element wise product of the diagonals. If you store the diagonals as vectors, then a trivial element wise multiply kernel is all that is required to compute the equivalent matrix product.