I have three matrices A,B and C:
And the matrix-matrix product for general matrices:
void cblas_dgemm(const enum CBLAS_ORDER __Order, const enum CBLAS_TRANSPOSE __TransA, const enum CBLAS_TRANSPOSE __TransB, const int __M, const int __N, const int __K, const double __alpha, const double *__A, const int __lda, const double *__B, const int __ldb, const double __beta, double *__C, const int __ldc);
For using the cblas_dgemm
-command I need to know the leading dimension. For me it is clear that in the case of the total matrix A (or its transpose form) we have: M=5, N=4, lda=4
.
In the case of submatrix C I think i have to overgive &A[5]
and set M=3, N=2, ldc=4
But I have no idea how this could work in the case of red submatrix B with M=4, N=2
. Can someone explain this to me. Thanks a lot.