18 int sindex(
int *T,
int nT,
int *A,
int nA){
43 #pragma omp parallel private(tid) shared(nths)
45 nths = omp_get_num_threads();
46 tid = omp_get_thread_num();
53 count = (
int *) malloc(nths *
sizeof(
int));
54 disp = (
int *) malloc(nths *
sizeof(
int));
56 for(i=0; i<nths; i++){
66 for(i=0; i<nths-1; i++){
67 disp[i+1] = disp[i] + count[i];
70 #pragma omp parallel private(tid) shared(T, nT, A, disp, count)
72 tid = omp_get_thread_num();
73 sindex(T, nT, A+disp[tid], count[tid]);
93 while(e != T[pivot] && max > min ){
100 pivot= min + (max-min)/2;