/* Example to illustrate GEMM operation on submatrices. A is 6 X 10, B is 5 X 6, C is 6 X 8 User wants to do C(2:5,5:6) = A(2:5,5:7) * B(2:4,2:3) */ #include #include int main(){ double A[6*10], B[5*6], C[6*8]; int m = 4, n = 2, k = 3, ldA = 10, ldB = 6, ldC = 8; // row and column counts : int rA = 6, rB = 5, rC = 6, cA = 10, cB = 6, cC = 8; // positions of first element of submatrices int sA = 14, sB = 7, sC = 12; double alpha=1.0, beta=0.0; int i,j; for(i=0; i