Lines Matching refs:sf

8 static PetscErrorCode PetscSFLinkStartCommunication_Alltoall(PetscSF sf, PetscSFLink link, PetscSFD…  in PetscSFLinkStartCommunication_Alltoall()  argument
17 …PetscCall(PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host bef… in PetscSFLinkStartCommunication_Alltoall()
19 …PetscCall(PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI(sf, link, PETSC_TRUE /* device2host */)… in PetscSFLinkStartCommunication_Alltoall()
21 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFLinkStartCommunication_Alltoall()
22 …PetscCall(PetscSFLinkGetMPIBuffersAndRequests(sf, link, direction, &rootbuf, &leafbuf, &req, NULL)… in PetscSFLinkStartCommunication_Alltoall()
23 PetscCall(PetscSFLinkSyncStreamBeforeCallMPI(sf, link)); in PetscSFLinkStartCommunication_Alltoall()
33 static PetscErrorCode PetscSFSetCommunicationOps_Alltoall(PetscSF sf, PetscSFLink link) in PetscSFSetCommunicationOps_Alltoall() argument
43 static PetscErrorCode PetscSFGetGraph_Alltoall(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, con… in PetscSFGetGraph_Alltoall() argument
48 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph_Alltoall()
49 if (nleaves) *nleaves = sf->nleaves; in PetscSFGetGraph_Alltoall()
52 if (!sf->remote) { in PetscSFGetGraph_Alltoall()
53 PetscCall(PetscMalloc1(sf->nleaves, &sf->remote)); in PetscSFGetGraph_Alltoall()
54 sf->remote_alloc = sf->remote; in PetscSFGetGraph_Alltoall()
55 for (i = 0; i < sf->nleaves; i++) { in PetscSFGetGraph_Alltoall()
56 sf->remote[i].rank = i; /* this is nonsense, cannot be larger than size */ in PetscSFGetGraph_Alltoall()
57 sf->remote[i].index = i; in PetscSFGetGraph_Alltoall()
60 *iremote = sf->remote; in PetscSFGetGraph_Alltoall()
65 static PetscErrorCode PetscSFCreateLocalSF_Alltoall(PetscSF sf, PetscSF *out) in PetscSFCreateLocalSF_Alltoall() argument
75 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)sf), &rank)); in PetscSFCreateLocalSF_Alltoall()
89 static PetscErrorCode PetscSFCreateEmbeddedRootSF_Alltoall(PetscSF sf, PetscInt nselected, const Pe… in PetscSFCreateEmbeddedRootSF_Alltoall() argument
99 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFCreateEmbeddedRootSF_Alltoall()
106sf->nroots, comm, PETSC_ERR_ARG_OUTOFRANGE, "Min/Max root indices %" PetscInt_FMT "/%" PetscInt_FM… in PetscSFCreateEmbeddedRootSF_Alltoall()
137 …PetscCall(PetscSFSetGraph(esf, sf->nleaves, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN… in PetscSFCreateEmbeddedRootSF_Alltoall()
189 PETSC_INTERN PetscErrorCode PetscSFCreate_Alltoall(PetscSF sf) in PetscSFCreate_Alltoall() argument
191 PetscSF_Alltoall *dat = (PetscSF_Alltoall *)sf->data; in PetscSFCreate_Alltoall()
194 sf->ops->BcastBegin = PetscSFBcastBegin_Basic; in PetscSFCreate_Alltoall()
195 sf->ops->BcastEnd = PetscSFBcastEnd_Basic; in PetscSFCreate_Alltoall()
196 sf->ops->ReduceBegin = PetscSFReduceBegin_Basic; in PetscSFCreate_Alltoall()
197 sf->ops->ReduceEnd = PetscSFReduceEnd_Basic; in PetscSFCreate_Alltoall()
200 sf->ops->Destroy = PetscSFDestroy_Allgatherv; in PetscSFCreate_Alltoall()
201 sf->ops->Reset = PetscSFReset_Allgatherv; in PetscSFCreate_Alltoall()
202 sf->ops->FetchAndOpEnd = PetscSFFetchAndOpEnd_Allgatherv; in PetscSFCreate_Alltoall()
203 sf->ops->GetRootRanks = PetscSFGetRootRanks_Allgatherv; in PetscSFCreate_Alltoall()
206 sf->ops->GetLeafRanks = PetscSFGetLeafRanks_Allgatherv; in PetscSFCreate_Alltoall()
207 sf->ops->SetUp = PetscSFSetUp_Allgather; in PetscSFCreate_Alltoall()
210 sf->ops->FetchAndOpBegin = PetscSFFetchAndOpBegin_Gatherv; in PetscSFCreate_Alltoall()
213 sf->ops->GetGraph = PetscSFGetGraph_Alltoall; in PetscSFCreate_Alltoall()
214 sf->ops->CreateLocalSF = PetscSFCreateLocalSF_Alltoall; in PetscSFCreate_Alltoall()
215 sf->ops->CreateEmbeddedRootSF = PetscSFCreateEmbeddedRootSF_Alltoall; in PetscSFCreate_Alltoall()
217 sf->ops->SetCommunicationOps = PetscSFSetCommunicationOps_Alltoall; in PetscSFCreate_Alltoall()
219 sf->collective = PETSC_TRUE; in PetscSFCreate_Alltoall()
222 sf->data = (void *)dat; in PetscSFCreate_Alltoall()