Lines Matching refs:fctx
52 struct FCtx *fctx = (struct FCtx *)ctx; in FSend() local
55 …PetscCheck(rank == fctx->toranks[tonum], PETSC_COMM_SELF, PETSC_ERR_PLIB, "Rank %d does not match … in FSend()
56 …tscCheck(fctx->rank == *(PetscMPIInt *)todata, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Todata %d does no… in FSend()
57 PetscCallMPI(MPI_Isend(&fctx->todata[tonum].rank, 1, MPIU_INT, rank, tag[0], comm, &req[0])); in FSend()
58 PetscCallMPI(MPI_Isend(&fctx->todata[tonum].value, 1, MPIU_SCALAR, rank, tag[1], comm, &req[1])); in FSend()
64 struct FCtx *fctx = (struct FCtx *)ctx; in FRecv() local
69 PetscCall(PetscSegBufferGet(fctx->seg, 1, &buf)); in FRecv()
114 struct FCtx fctx; in main() local
116 fctx.rank = rank; in main()
117 fctx.nto = nto; in main()
118 fctx.toranks = toranks; in main()
119 fctx.todata = todata; in main()
120 PetscCall(PetscSegBufferCreate(sizeof(Unit), 1, &fctx.seg)); in main()
123 …WORLD, 1, MPI_INT, nto, toranks, todummy, &nfrom, &fromranks, &fromdummy, 2, FSend, FRecv, &fctx)); in main()
126 PetscCall(PetscSegBufferExtractAlloc(fctx.seg, &fromdata)); in main()
127 PetscCall(PetscSegBufferDestroy(&fctx.seg)); in main()