Lines Matching refs:pivots
96 PetscInt *pivots, *finalpivots, i; in PetscParallelSampleSelect() local
105 PetscCall(PetscMalloc1(size - 1, &pivots)); in PetscParallelSampleSelect()
113 pivots[i] = PETSC_INT_MAX; in PetscParallelSampleSelect()
120 pivots[i] = keysin[index]; in PetscParallelSampleSelect()
124 PetscCall(PetscParallelSortInt_Bitonic(mapin->comm, size - 1, pivots)); in PetscParallelSampleSelect()
128 PetscCall(PetscParallelSortedInt(mapin->comm, size - 1, pivots, &sorted)); in PetscParallelSampleSelect()
152 for (i = 0; i < keys_per[rank]; i++) pivots[i] = pivots[my_first + i * non_empty]; in PetscParallelSampleSelect()
153 for (i = keys_per[rank]; i < max_keys_per; i++) pivots[i] = PETSC_INT_MAX; in PetscParallelSampleSelect()
154 …PetscCallMPI(MPI_Allgather(pivots, max_keys_per, MPIU_INT, finalpivots, max_keys_per, MPIU_INT, ma… in PetscParallelSampleSelect()
164 PetscCall(PetscFree(pivots)); in PetscParallelSampleSelect()
237 PetscInt *pivots = NULL, *buffer; in PetscParallelSortInt_Samplesort() local
248 PetscCall(PetscParallelSampleSelect(mapin, mapout, keysin, &pivots)); in PetscParallelSortInt_Samplesort()
254 while ((j < mapin->n) && (keysin[j] < pivots[i])) j++; in PetscParallelSortInt_Samplesort()
269 PetscCall(PetscFree(pivots)); in PetscParallelSortInt_Samplesort()