os_kernel_lab/related_info/lab3/locality/goodlocality.c

13 lines
256 B
C
Raw Normal View History

2015-03-23 09:11:45 +08:00
#include <stdio.h>
#define NUM 1024
#define COUNT 10
int A[NUM][NUM];
void main (void) {
int i,j,k;
for (k = 0; k<COUNT; k++)
for (i = 0; i < NUM; i++)
for (j = 0; j < NUM; j++)
A[i][j] = i+j;
printf("%d count computing over!\n",i*j*k);
}