testing/icgen/random_verschillende_resoluties_N-GenIC/gadget3_64/gravtree.c
int data_index_compare(const void *a, const void *b)
{
  if(((struct data_index *) a)->Task < (((struct data_index *) b)->Task))
    return -1;

  if(((struct data_index *) a)->Task > (((struct data_index *) b)->Task))
    return +1;

  if(((struct data_index *) a)->Index < (((struct data_index *) b)->Index))
    return -1;

  if(((struct data_index *) a)->Index > (((struct data_index *) b)->Index))
    return +1;

  if(((struct data_index *) a)->IndexGet < (((struct data_index *) b)->IndexGet))
    return -1;

  if(((struct data_index *) a)->IndexGet > (((struct data_index *) b)->IndexGet))
    return +1;

  return 0;
}
/*! This function is used as a comparison kernel in a sort routine. It is
 *  used to group particles in the communication buffer that are going to
 *  be sent to the same CPU.
    */
This function is used as a comparison kernel in a sort routine. It is
used to group particles in the communication buffer that are going to
be sent to the same CPU.
This function is used as a comparison kernel in a sort routine . It is used to group particles in the communication buffer that are going to be sent to the same CPU .
int data_index_compare(const void *a, const void *b)
{
  if(((struct data_index *) a)->Task < (((struct data_index *) b)->Task))
    return -1;
  if(((struct data_index *) a)->Task > (((struct data_index *) b)->Task))
    return +1;
  if(((struct data_index *) a)->Index < (((struct data_index *) b)->Index))
    return -1;
  if(((struct data_index *) a)->Index > (((struct data_index *) b)->Index))
    return +1;
  if(((struct data_index *) a)->IndexGet < (((struct data_index *) b)->IndexGet))
    return -1;
  if(((struct data_index *) a)->IndexGet > (((struct data_index *) b)->IndexGet))
    return +1;
  return 0;
}
int data_index_compare ( const void * a , const void * b ) { if ( ( ( struct data_index * ) a ) -> Task < ( ( ( struct data_index * ) b ) -> Task ) ) return -1 ; if ( ( ( struct data_index * ) a ) -> Task > ( ( ( struct data_index * ) b ) -> Task ) ) return +1 ; if ( ( ( struct data_index * ) a ) -> Index < ( ( ( struct data_index * ) b ) -> Index ) ) return -1 ; if ( ( ( struct data_index * ) a ) -> Index > ( ( ( struct data_index * ) b ) -> Index ) ) return +1 ; if ( ( ( struct data_index * ) a ) -> IndexGet < ( ( ( struct data_index * ) b ) -> IndexGet ) ) return -1 ; if ( ( ( struct data_index * ) a ) -> IndexGet > ( ( ( struct data_index * ) b ) -> IndexGet ) ) return +1 ; return 0 ; }
This function is used as a comparison kernel in a sort routine.
This function is used as a comparison kernel in a sort routine .