Lines Matching refs:nleaves
4 …rCode PetscSFGetGraph_Allgatherv(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, const PetscInt *… in PetscSFGetGraph_Allgatherv() argument
13 if (nleaves) *nleaves = sf->nleaves; in PetscSFGetGraph_Allgatherv()
16 …if (!sf->remote && sf->nleaves) { /* The && sf->nleaves makes sfgatherv able to inherit this routi… in PetscSFGetGraph_Allgatherv()
18 PetscCall(PetscMalloc1(sf->nleaves, &sf->remote)); in PetscSFGetGraph_Allgatherv()
44 if (sf->nleaves) { /* This if (sf->nleaves) test makes sfgatherv able to inherit this routine */ in PetscSFSetUp_Allgatherv()
105 PetscMPIInt sendcount, rank, nleaves; in PetscSFBcastBegin_Allgatherv() local
123 PetscCall(PetscMPIIntCast(sf->nleaves, &nleaves)); in PetscSFBcastBegin_Allgatherv()
124 …if (dat->bcast_pattern) PetscCallMPI(MPIU_Ibcast(leafbuf, nleaves, unit, dat->bcast_root, comm, re… in PetscSFBcastBegin_Allgatherv()
153 PetscInt nleaves = sf->nleaves; in PetscSFReduceBegin_Allgatherv() local
161 nleaves *= nreal; in PetscSFReduceBegin_Allgatherv()
169 nleaves *= ncomplex; in PetscSFReduceBegin_Allgatherv()
173 PetscCall(PetscMPIIntCast(nleaves, &nleavesi)); in PetscSFReduceBegin_Allgatherv()
187 PetscCall(PetscMPIIntCast(sf->nleaves * link->bs, &count)); in PetscSFReduceBegin_Allgatherv()
293 …PetscCall((*link->Memcpy)(link, leafmtype, leafupdate, leafmtype, leafdata, sf->nleaves * link->un… in PetscSFFetchAndOpBegin_Allgatherv()
303 PetscCall(PetscMPIIntCast(sf->nleaves, &count)); in PetscSFFetchAndOpBegin_Allgatherv()
306 PetscCall(PetscMPIIntCast(sf->nleaves * link->bs, &count)); in PetscSFFetchAndOpBegin_Allgatherv()
339 …(PetscMalloc4(size, &sf->ranks, size + 1, &sf->roffset, sf->nleaves, &sf->rmine, sf->nleaves, &sf-… in PetscSFGetRootRanks_Allgatherv()
342 …for (PetscInt i = 0; i < sf->nleaves; i++) sf->rmine[i] = i; /*rmine are never NULL even for conti… in PetscSFGetRootRanks_Allgatherv()
395 PetscCall(PetscMalloc1(sf->nleaves, &dat->irootloc)); in PetscSFGetLeafRanks_Allgatherv()
407 PetscInt i, nroots, nleaves, rstart, *ilocal; in PetscSFCreateLocalSF_Allgatherv() local
412 nleaves = sf->nleaves ? sf->nroots : 0; /* sf->nleaves can be zero with SFGather(v) */ in PetscSFCreateLocalSF_Allgatherv()
413 nroots = nleaves; in PetscSFCreateLocalSF_Allgatherv()
414 PetscCall(PetscMalloc1(nleaves, &ilocal)); in PetscSFCreateLocalSF_Allgatherv()
415 PetscCall(PetscMalloc1(nleaves, &iremote)); in PetscSFCreateLocalSF_Allgatherv()
418 for (i = 0; i < nleaves; i++) { in PetscSFCreateLocalSF_Allgatherv()
425 …PetscCall(PetscSFSetGraph(lsf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POIN… in PetscSFCreateLocalSF_Allgatherv()