PKUOS - Pintos
Pintos source browser for PKU Operating System course
Macros | Functions | Variables
matmult.c File Reference
#include <stdio.h>
#include <syscall.h>
Include dependency graph for matmult.c:

Go to the source code of this file.

Macros

#define DIM   128
 matmult.c More...
 

Functions

int main (void)
 

Variables

int A [DIM][DIM]
 
int B [DIM][DIM]
 
int C [DIM][DIM]
 

Macro Definition Documentation

◆ DIM

#define DIM   128

matmult.c

Test program to do matrix multiplication on large arrays.

Intended to stress virtual memory system.

Ideally, we could read the matrices off of the file system, and store the result back to the file system! You should define DIM to be large enough that the arrays don't fit in physical memory.

Dim Memory


16 3 kB 64 48 kB 128 192 kB 256 768 kB 512 3,072 kB 1,024 12,288 kB 2,048 49,152 kB 4,096 196,608 kB 8,192 786,432 kB 16,384 3,145,728 kB

Definition at line 29 of file matmult.c.

Function Documentation

◆ main()

int main ( void  )

Definition at line 36 of file matmult.c.

References A, B, C, DIM, and exit().

Here is the call graph for this function:

Variable Documentation

◆ A

int A[DIM][DIM]

Definition at line 31 of file matmult.c.

Referenced by main().

◆ B

int B[DIM][DIM]

Definition at line 32 of file matmult.c.

Referenced by main().

◆ C

int C[DIM][DIM]

Definition at line 33 of file matmult.c.

Referenced by main().