Skip to main content
`Ctrl`+`K`

# PetscSFFetchAndOpWithMemTypeBegin

begin operation with explicit memory types that fetches values from root and updates atomically by applying operation using my leaf value, to be completed with `PetscSFFetchAndOpEnd()`

## Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFFetchAndOpWithMemTypeBegin(PetscSF sf, MPI_Datatype unit, PetscMemType rootmtype, void *rootdata, PetscMemType leafmtype, const void *leafdata, PetscMemType leafupdatemtype, void *leafupdate, MPI_Op op)

Collective

## Input Parameters

- sf - star forest

- unit - data type

- rootmtype - memory type of rootdata

- leafmtype - memory type of leafdata

- leafdata - leaf values to use in reduction

- leafupdatemtype - memory type of leafupdate

- op - operation to use for reduction

## Output Parameters

- rootdata - root values to be updated, input state is seen by first process to perform an update

- leafupdate - state at each leaf’s respective root immediately prior to my atomic update

## Note

See `PetscSFFetchAndOpBegin()` for more details.

## See Also

`PetscSF`, `PetscSFFetchAndOpBegin()`, `PetscSFComputeDegreeBegin()`, `PetscSFReduceBegin()`, `PetscSFSetGraph()`, `PetscSFFetchAndOpEnd()`

## Level

advanced

## Location

src/vec/is/sf/interface/sf.c

Index of all PetscSF routines
Table of Contents for all manual pages
Index of all manual pages