Lines Matching refs:range

59   (*map)->range       = NULL;  in PetscLayoutCreate()
132 if ((*map)->range_alloc) PetscCall(PetscFree((*map)->range)); in PetscLayoutDestroy()
160 PetscErrorCode PetscLayoutCreateFromRanges(MPI_Comm comm, const PetscInt range[], PetscCopyMode mod… in PetscLayoutCreateFromRanges() argument
171 PetscCall(PetscMalloc1(map->size + 1, &map->range)); in PetscLayoutCreateFromRanges()
172 PetscCall(PetscArraycpy(map->range, range, map->size + 1)); in PetscLayoutCreateFromRanges()
177 map->range = (PetscInt *)range; in PetscLayoutCreateFromRanges()
182 map->rstart = map->range[rank]; in PetscLayoutCreateFromRanges()
183 map->rend = map->range[rank + 1]; in PetscLayoutCreateFromRanges()
185 map->N = map->range[map->size] - map->range[0]; in PetscLayoutCreateFromRanges()
250 if (!map->range) PetscCall(PetscMalloc1(map->size + 1, &map->range)); in PetscLayoutSetUp()
251 PetscCallMPI(MPI_Allgather(&map->n, 1, MPIU_INT, map->range + 1, 1, MPIU_INT, map->comm)); in PetscLayoutSetUp()
253 map->range[0] = 0; in PetscLayoutSetUp()
254 for (p = 2; p <= map->size; p++) map->range[p] += map->range[p - 1]; in PetscLayoutSetUp()
256 map->rstart = map->range[rank]; in PetscLayoutSetUp()
257 map->rend = map->range[rank + 1]; in PetscLayoutSetUp()
293 if (in->range) { in PetscLayoutDuplicate()
294 PetscCall(PetscMalloc1((*out)->size + 1, &(*out)->range)); in PetscLayoutDuplicate()
295 PetscCall(PetscArraycpy((*out)->range, in->range, (*out)->size + 1)); in PetscLayoutDuplicate()
569 PetscErrorCode PetscLayoutGetRanges(PetscLayout map, const PetscInt *range[]) in PetscLayoutGetRanges() argument
572 *range = map->range; in PetscLayoutGetRanges()
597 …apa->N == mapb->N && mapa->range && mapb->range && mapa->size == mapb->size) PetscCall(PetscArrayc… in PetscLayoutCompare()
623 …PetscAssert((map->n >= 0) && (map->N >= 0) && (map->range), PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGST… in PetscLayoutFindOwner()
628 if (idx < map->range[t]) hi = t; in PetscLayoutFindOwner()
657 …PetscAssert((map->n >= 0) && (map->N >= 0) && (map->range), PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGST… in PetscLayoutFindOwnerIndex()
662 if (idx < map->range[t]) hi = t; in PetscLayoutFindOwnerIndex()
666 if (lidx) *lidx = idx - map->range[lo]; in PetscLayoutFindOwnerIndex()