PetscSFBackend — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscSFBackend

Device backend used by a `PetscSF` to pack, unpack, and exchange data when doing device-aware communication

## Synopsis

    /* When doing device-aware MPI, a backend refers to the SF/device interface */typedef enum {
      PETSCSF_BACKEND_INVALID = 0,
      PETSCSF_BACKEND_CUDA    = 1,
      PETSCSF_BACKEND_HIP     = 2,
      PETSCSF_BACKEND_KOKKOS  = 3
    } PetscSFBackend;

## Values

- `PETSCSF_BACKEND_INVALID` - no backend has been selected (the default for a host-only SF)

- `PETSCSF_BACKEND_CUDA` - use CUDA-aware pack/unpack and MPI

- `PETSCSF_BACKEND_HIP` - use HIP-aware pack/unpack and MPI

- `PETSCSF_BACKEND_KOKKOS` - use the Kokkos backend (which itself may dispatch to CUDA, HIP, or OpenMP)

## See Also

PetscSF - an alternative to low-level MPI calls for data communication, `PetscSF`, `PetscSFLink`, `PetscSFDirection`, `PetscSFOperation`

## Level

developer

## Location

include/petscsftypes.h

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