Line 200... |
Line 200... |
timings->preroll = i;
|
timings->preroll = i;
|
timings->nshared = 0;
|
timings->nshared = 0;
|
return timings;
|
return timings;
|
}
|
}
|
|
|
|
|
/* Simple comparison function */
|
/* Simple comparison function */
|
int
|
int
|
tim_comp (cuc_timings * a, cuc_timings * b)
|
tim_comp (cuc_timings * a, cuc_timings * b)
|
{
|
{
|
if (a->new_time < b->new_time)
|
if (a->new_time < b->new_time)
|
Line 332... |
Line 333... |
for (i = 0; i < nt; i++)
|
for (i = 0; i < nt; i++)
|
PRINTF ("%i:%i,%i: %icyc\n",
|
PRINTF ("%i:%i,%i: %icyc\n",
|
t[i].b, t[i].preroll, t[i].unroll, t[i].new_time);
|
t[i].b, t[i].preroll, t[i].unroll, t[i].new_time);
|
#endif
|
#endif
|
|
|
|
#if HAVE___COMPAR_FN_T
|
|
qsort (t, nt, sizeof (cuc_timings),
|
|
(__compar_fn_t) tim_comp);
|
|
#else
|
qsort (t, nt, sizeof (cuc_timings),
|
qsort (t, nt, sizeof (cuc_timings),
|
(int (*)(const void *, const void *)) tim_comp);
|
(int (*)(const void *, const void *)) tim_comp);
|
|
#endif
|
|
|
/* Delete timings, that have worst time and bigger size than other */
|
/* Delete timings, that have worst time and bigger size than other */
|
j = 1;
|
j = 1;
|
csize = t[0].size;
|
csize = t[0].size;
|
for (i = 1; i < nt; i++)
|
for (i = 1; i < nt; i++)
|
Line 376... |
Line 382... |
cucdebug (1, "%i:%i,%i: %icyc %.1f\n",
|
cucdebug (1, "%i:%i,%i: %icyc %.1f\n",
|
t[i].b, t[i].preroll, t[i].unroll, t[i].new_time,
|
t[i].b, t[i].preroll, t[i].unroll, t[i].new_time,
|
t[i].size);
|
t[i].size);
|
|
|
/* Sort again with new timings added */
|
/* Sort again with new timings added */
|
|
#if HAVE___COMPAR_FN_T
|
|
qsort (t, nt, sizeof (cuc_timings),
|
|
(__compar_fn_t) tim_comp);
|
|
#else
|
qsort (t, nt, sizeof (cuc_timings),
|
qsort (t, nt, sizeof (cuc_timings),
|
(int (*)(const void *, const void *)) tim_comp);
|
(int (*)(const void *, const void *)) tim_comp);
|
|
#endif
|
|
|
/* Delete timings, that have worst time and bigger size than other */
|
/* Delete timings, that have worst time and bigger size than other */
|
j = 1;
|
j = 1;
|
csize = t[0].size;
|
csize = t[0].size;
|
for (i = 1; i < nt; i++)
|
for (i = 1; i < nt; i++)
|