xref: /petsc/src/vec/is/sf/impls/basic/allgatherv/sfallgatherv.h (revision 58c0e5077dcf40d6a880c19c87f1075ae1d22c8e)
1 #if !defined(_SFALLGATHERV_H)
2 #define _SFALLGATHERV_H
3 
4 #include <petsc/private/sfimpl.h> /*I "petscsf.h" I*/
5 #include <../src/vec/is/sf/impls/basic/sfpack.h>
6 #include <../src/vec/is/sf/impls/basic/sfbasic.h>
7 
8 typedef struct _n_PetscSFPack_Allgatherv *PetscSFPack_Allgatherv;
9 struct _n_PetscSFPack_Allgatherv {
10   SFPACKHEADER;
11   char          *root;   /* root buffer */
12   char          *leaf;   /* leaf buffer */
13   MPI_Request   request;
14 };
15 
16 typedef struct {
17   SFBASICHEADER;
18   PetscMPIInt   *displs,*recvcounts;
19 } PetscSF_Allgatherv;
20 
21 PETSC_INTERN PetscErrorCode PetscSFSetUp_Allgatherv(PetscSF);
22 PETSC_INTERN PetscErrorCode PetscSFPackGet_Allgatherv(PetscSF,MPI_Datatype,const void*,const void*,PetscSFPack_Allgatherv*);
23 PETSC_INTERN PetscErrorCode PetscSFReset_Allgatherv(PetscSF);
24 PETSC_INTERN PetscErrorCode PetscSFDestroy_Allgatherv(PetscSF);
25 PETSC_INTERN PetscErrorCode PetscSFBcastAndOpEnd_Allgatherv(PetscSF,MPI_Datatype,const void*,void*,MPI_Op);
26 PETSC_INTERN PetscErrorCode PetscSFReduceEnd_Allgatherv(PetscSF,MPI_Datatype,const void*,void*,MPI_Op);
27 PETSC_INTERN PetscErrorCode PetscSFFetchAndOpBegin_Allgatherv(PetscSF sf,MPI_Datatype unit,void *rootdata,const void *leafdata,void *leafupdate,MPI_Op op);
28 PETSC_INTERN PetscErrorCode PetscSFFetchAndOpEnd_Allgatherv(PetscSF,MPI_Datatype,void*,const void*,void*,MPI_Op);
29 PETSC_INTERN PetscErrorCode PetscSFGetRootRanks_Allgatherv(PetscSF,PetscInt*,const PetscMPIInt**,const PetscInt**,const PetscInt**,const PetscInt**);
30 PETSC_INTERN PetscErrorCode PetscSFGetLeafRanks_Allgatherv(PetscSF,PetscInt*,const PetscMPIInt**,const PetscInt**,const PetscInt**);
31 PETSC_INTERN PetscErrorCode PetscSFCreateLocalSF_Allgatherv(PetscSF,PetscSF*);
32 PETSC_INTERN PetscErrorCode PetscSFGetGraph_Allgatherv(PetscSF,PetscInt*,PetscInt*,const PetscInt**,const PetscSFNode**);
33 #endif
34