Hani
Hani

Reputation: 131

GEMM with single-precision and double-precision matrix in BLAS

I am writing some linear algebra program with openBLAS. The program needs to multiply two matrices; the one is of single-precision and the other one is of double-precision.

I looked up the BLAS reference "http://netlib.org/blas/blasqr.pdf", it seems that BLAS only supports operations on the same type.

Is there anything I miss? Or, to multiply two matrices with different precision, do I need to typecast the single-precision matrix and then multiply them?

Upvotes: 0

Views: 531

Answers (1)

ev-br
ev-br

Reputation: 26050

Yes, you need to upcast the single-precision matrix (or downcast the double-precision one) and use dgemm (or sgemm, resp.)

Upvotes: 1

Related Questions