realheapsort_step1.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:23.0
disk size 475 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
int nondet();

//realheapsort - contruction only
// avec aspic -delay 5
void realheapsort_step1(int N)
{
  //int t[100],
  int temp;
  int k,j,m;
  if(N > 2){
  //construction
    for (k=1;k<=N-1;k++)
      {
        j=k;
        // t[pere j] > t[j]
        while ((j>0) && (nondet()>nondet()))
	  {
	    //swap j avec pere j puis j<-pere j
            temp = nondet();//t[j];
	    ;//t[j] = t[(j+1)/2-1];
	    ;//t[(j+1)/2-1] = temp;
	    j = (j+1)/2-1;
	  }
      }
  }
}
popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark