/[escript]/branches/domexper/dudley/src/Util.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 751 by bcumming, Mon Jun 26 01:46:34 2006 UTC revision 763 by gross, Fri Jun 30 05:52:31 2006 UTC
# Line 23  Line 23 
23    
24  #include "Finley.h"  #include "Finley.h"
25  #include "Util.h"  #include "Util.h"
26    
27  #ifdef _OPENMP  #ifdef _OPENMP
28  #include <omp.h>  #include <omp.h>
29  #endif  #endif
# Line 371  int Finley_Util_ValueAndIndex_compar(con Line 372  int Finley_Util_ValueAndIndex_compar(con
372     e2=(Finley_Util_ValueAndIndex*) arg2;     e2=(Finley_Util_ValueAndIndex*) arg2;
373     if (e1->value < e2->value) return -1;     if (e1->value < e2->value) return -1;
374     if (e1->value > e2->value) return  1;     if (e1->value > e2->value) return  1;
375       if (e1->index < e2->index) return -1;
376       if (e1->index > e2->index) return  1;
377     return 0;     return 0;
378  }  }
379    
380  void Finley_Util_sortValueAndIndex(dim_t n,Finley_Util_ValueAndIndex* array) {  void Finley_Util_sortValueAndIndex(dim_t n,Finley_Util_ValueAndIndex* array) {
381       /* OMP : needs parallelization !*/       /* OMP : needs parallelization !*/
382       qsort(array,n,sizeof(Finley_Util_ValueAndIndex),Finley_Util_ValueAndIndex_compar);       qsort(array,n,sizeof(Finley_Util_ValueAndIndex),Finley_Util_ValueAndIndex_compar);

Legend:
Removed from v.751  
changed lines
  Added in v.763

  ViewVC Help
Powered by ViewVC 1.1.26