Lines Matching refs:vdx
23 static PetscErrorCode PetscSortIntWithPermutation_Private(const PetscInt v[], PetscInt vdx[], Petsc… in PetscSortIntWithPermutation_Private() argument
30 if (v[vdx[0]] > v[vdx[1]]) SWAP(vdx[0], vdx[1], tmp); in PetscSortIntWithPermutation_Private()
34 SWAP(vdx[0], vdx[right / 2], tmp); in PetscSortIntWithPermutation_Private()
35 vl = v[vdx[0]]; in PetscSortIntWithPermutation_Private()
38 if (v[vdx[i]] < vl) { in PetscSortIntWithPermutation_Private()
40 SWAP(vdx[last], vdx[i], tmp); in PetscSortIntWithPermutation_Private()
43 SWAP(vdx[0], vdx[last], tmp); in PetscSortIntWithPermutation_Private()
44 PetscCall(PetscSortIntWithPermutation_Private(v, vdx, last - 1)); in PetscSortIntWithPermutation_Private()
45 PetscCall(PetscSortIntWithPermutation_Private(v, vdx + last + 1, right - (last + 1))); in PetscSortIntWithPermutation_Private()
93 static PetscErrorCode PetscSortRealWithPermutation_Private(const PetscReal v[], PetscInt vdx[], Pet… in PetscSortRealWithPermutation_Private() argument
101 if (v[vdx[0]] > v[vdx[1]]) SWAP(vdx[0], vdx[1], tmp); in PetscSortRealWithPermutation_Private()
105 SWAP(vdx[0], vdx[right / 2], tmp); in PetscSortRealWithPermutation_Private()
106 vl = v[vdx[0]]; in PetscSortRealWithPermutation_Private()
109 if (v[vdx[i]] < vl) { in PetscSortRealWithPermutation_Private()
111 SWAP(vdx[last], vdx[i], tmp); in PetscSortRealWithPermutation_Private()
114 SWAP(vdx[0], vdx[last], tmp); in PetscSortRealWithPermutation_Private()
115 PetscCall(PetscSortRealWithPermutation_Private(v, vdx, last - 1)); in PetscSortRealWithPermutation_Private()
116 PetscCall(PetscSortRealWithPermutation_Private(v, vdx + last + 1, right - (last + 1))); in PetscSortRealWithPermutation_Private()
165 static PetscErrorCode PetscSortStrWithPermutation_Private(const char *v[], PetscInt vdx[], PetscInt… in PetscSortStrWithPermutation_Private() argument
174 PetscCall(PetscStrgrt(v[vdx[0]], v[vdx[1]], >)); in PetscSortStrWithPermutation_Private()
175 if (gt) SWAP(vdx[0], vdx[1], tmp); in PetscSortStrWithPermutation_Private()
179 SWAP(vdx[0], vdx[right / 2], tmp); in PetscSortStrWithPermutation_Private()
180 vl = v[vdx[0]]; in PetscSortStrWithPermutation_Private()
183 PetscCall(PetscStrgrt(vl, v[vdx[i]], >)); in PetscSortStrWithPermutation_Private()
186 SWAP(vdx[last], vdx[i], tmp); in PetscSortStrWithPermutation_Private()
189 SWAP(vdx[0], vdx[last], tmp); in PetscSortStrWithPermutation_Private()
190 PetscCall(PetscSortStrWithPermutation_Private(v, vdx, last - 1)); in PetscSortStrWithPermutation_Private()
191 PetscCall(PetscSortStrWithPermutation_Private(v, vdx + last + 1, right - (last + 1))); in PetscSortStrWithPermutation_Private()