MCPcopy Create free account
hub / github.com/AdvancedCompiler/AdvancedCompiler / main

Function main

code/Chapter2/2-6.c:23–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 }
22 }
23int main(){
24 for (i = 0; i < n; i++)
25 {
26 for (j = 0; j < n; j++)
27 {
28 y[i][j] = rand() % 10;
29 z[i][j] = rand() % 10;
30 x[i][j] = 0;
31 }
32 }
33struct timeval starttime,endtime;
34 gettimeofday(&starttime,0);
35 matrixmulti(n, x, y, z);
36gettimeofday(&endtime,0);
37 doubletimeuse=(endtime.tv_sec-starttime.tv_sec)+(endtime.tv_usec-starttime.tv_usec)/1000000.0;
38 printf("run time = %f s\n", timeuse);
39return 0;
40}

Callers

nothing calls this directly

Calls 2

gettimeofdayFunction · 0.85
matrixmultiFunction · 0.70

Tested by

no test coverage detected