MCPcopy Create free account
hub / github.com/I-Rinka/BIT-Compile-Principle / Multiply

Function Multiply

Lab1/C/src/Matrix_Multiply.c:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9}
10
11int *Multiply(int *matrix1, int *matrix2)
12{
13 int *ans = (int *)calloc(sizeof(int), size * size);
14 for (int i = 0; i < size; i++)
15 {
16 for (int j = 0; j < size; j++)
17 {
18 int temp = 0;
19 for (int n = 0; n < size; n++)
20 {
21 temp += *GetPoint(matrix1, i, n) * (*GetPoint(matrix2, n, j));
22 }
23 *GetPoint(ans, i, j) = temp;
24 }
25 }
26 return ans;
27}
28int main()
29{
30 size = 1000;

Callers 1

mainFunction · 0.70

Calls 1

GetPointFunction · 0.70

Tested by

no test coverage detected