/* =================================================== * compile with gcc : * gcc -pg -o prog.exe prog.c * ./prog.exe * gprof prog.exe * =================================================== */ #include #include #include // number of loops for each calculation #define MAX_LOOPS 2000 // first dimension of arrays (number of rows) #define SIZE1 1000 // second dimension of arrays (number of columns) #define SIZE2 2000 // type of array #define TYPE float /** * allocate matrix of size : SIZE1*SIZE2*sizeof(TYPE) */ TYPE **allocate_array() { int i; TYPE **array; array=(TYPE **) calloc(SIZE1,sizeof(TYPE *)); for (i=0;i