1

Say I want to calculate x^T * Y, x is an n by 1 matrix and Y is an n by n matrix:

cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const blasint M, const blasint N, const blasint K, const double alpha, const double *A, const blasint lda, const double *B, const blasint ldb, const double beta, double *C, const blasint ldc)

Would calling the function with TransA=CblasTrans and TransB=CblasNoTrans calculate x^T * Y instead of x * Y? How does setting TransA or TransB as CblasTrans affect the values of M, N, K? To my understanding, M is the number of rows of A, N is the number of columns of B and K is the number of rows of B and columns of A. Should I pass the dimensions of the original matrices(M=n, N=n, K= should it be 1 or n?), or the dimensions of the transposed matrix(M=1, N=n, K=n) when setting TransA or TransB as CblasTrans?

asked Oct 28, 2024 at 15:52

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.