# PetscSFBcastWithMemTypeBegin
begin pointwise broadcast with root value being reduced to leaf value with explicit memory types, to be concluded with call to `PetscSFBcastEnd()` 
## Synopsis
```
#include "petscsf.h" 
PetscErrorCode PetscSFBcastWithMemTypeBegin(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op)
```
Collective


## Input Parameters

- ***sf -*** star forest on which to communicate
- ***unit -*** data type associated with each node
- ***rootmtype -*** memory type of rootdata
- ***rootdata -*** buffer to broadcast
- ***leafmtype -*** memory type of leafdata
- ***op -*** operation to use for reduction



## Output Parameter

- ***leafdata -*** buffer to be reduced with values from each leaf's respective root





## See Also
 `PetscSF`, `PetscSFBcastEnd()`, `PetscSFBcastBegin()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/interface/sf.c.html#PetscSFBcastWithMemTypeBegin">src/vec/is/sf/interface/sf.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
