Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <sys/time.h>
- #include "tree.h"
- double gettime ()
- {
- struct timeval tv;
- gettimeofday (&tv, 0);
- return (double)tv.tv_sec + (0.000001 * (double)tv.tv_usec);
- }
- int main()
- {
- int i,j;
- int n = 1000000;
- dot *big_set = malloc (sizeof(dot) * n);
- for (i=0; i<n; i++)
- {
- for (j=0; j<N; j++)
- {
- big_set[i].c[j] = 1.0 * rand();
- }
- }
- double time = gettime();
- struct node *big_tree = make_tree (big_set, n);
- time = gettime() - time;
- printf ("%f\n", time);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement