Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Multiplication of matrix in C and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frederic GAVA <frederic.gava@w...>
Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml
> For the C side, I recommend using clock() to time the runs. This also 
> factors out the cost of creating the random matricies. Basically, you 
> just do:
> 
> #include 
> 
> ...
> {
> clock_t start, stop;
> ...
> start = clock();
> /* stuff to time here */
> stop = clock();
> printf("The amount of time taken = %f seconds\n", 
> ((double)(stop-start))/((double) CLOCKS_PER_SEC));
> /* write result to file */
> }

Many parallel C libraries have also there own timer.
MPI=> MPI_Wtime
BSPlib => bsp_time
PVM=>...

It is very usefull because they do not take into account time to initialize the parallel machine...

Frédéric Gava