:orphan:
# PetscSFGatherEnd
ends pointwise gather operation that was started with `PetscSFGatherBegin()`
## Synopsis
```
#include "petscsf.h"
PetscErrorCode PetscSFGatherEnd(PetscSF sf, MPI_Datatype unit, const void *leafdata, void *multirootdata)
```
Collective
## Input Parameters
- ***sf -*** star forest
- ***unit -*** data type
- ***leafdata -*** leaf data to gather to roots
## Output Parameter
- ***multirootdata -*** root buffer to gather into, amount of space per root is equal to its degree
## See Also
`PetscSF`, `PetscSFComputeDegreeEnd()`, `PetscSFScatterEnd()`
## Level
intermediate
## Location
src/vec/is/sf/interface/sf.c
## Examples
src/vec/is/sf/tutorials/ex1.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/sf/interface/sf.c)
[Index of all PetscSF routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)