Actual source code: mpidense.h

      1: #pragma once

      3: #include <../src/mat/impls/dense/seq/dense.h>
      4: #include <petscsf.h>

      6: /*  Data structures for basic parallel dense matrix  */

      8: typedef struct {  /* used by MatMatMultxxx_MPIDense_MPIDense() */
      9:   Mat Ae, Be, Ce; /* matrix in Elemental format */
     10: } MatProductCtx_MatMultDense;

     12: typedef struct { /* used by MatTransposeMatMultXXX_MPIDense_MPIDense() */
     13:   PetscScalar *sendbuf;
     14:   Mat          atb;
     15:   PetscMPIInt *recvcounts;
     16:   PetscMPIInt  tag;
     17: } MatProductCtx_TransMatMultDense;

     19: typedef struct { /* used by MatMatTransposeMultxxx_MPIDense_MPIDense() */
     20:   PetscScalar *buf[2];
     21:   PetscMPIInt  tag;
     22:   PetscMPIInt *recvcounts;
     23:   PetscMPIInt *recvdispls;
     24:   PetscInt     alg; /* algorithm used */
     25: } MatProductCtx_MatTransMultDense;

     27: PETSC_INTERN PetscErrorCode MatSetUpMultiply_MPIDense(Mat);
     28: PETSC_INTERN PetscErrorCode MatCreateSubMatrices_MPIDense(Mat, PetscInt, const IS[], const IS[], MatReuse, Mat *[]);
     29: PETSC_INTERN PetscErrorCode MatProductSetFromOptions_MPIAIJ_MPIDense(Mat);

     31: PETSC_INTERN PetscErrorCode MatProductSetFromOptions_MPIDense_MPIAIJ(Mat);

     33: #if defined(PETSC_HAVE_ELEMENTAL)
     34: PETSC_INTERN PetscErrorCode MatMatMultSymbolic_Elemental(Mat, Mat, PetscReal, Mat);
     35: PETSC_INTERN PetscErrorCode MatMatMultNumeric_Elemental(Mat, Mat, Mat);
     36: #endif
     37: PETSC_INTERN PetscErrorCode MatConvert_SeqDense_SeqAIJ(Mat A, MatType newtype, MatReuse reuse, Mat *newmat);

     39: PETSC_INTERN PetscErrorCode MatShift_MPIDense(Mat, PetscScalar);
     40: PETSC_INTERN PetscErrorCode MatDenseGetColumnVecWrite_MPIDense(Mat, PetscInt, Vec *);
     41: PETSC_INTERN PetscErrorCode MatDenseGetColumnVecRead_MPIDense(Mat, PetscInt, Vec *);
     42: PETSC_INTERN PetscErrorCode MatDenseGetColumnVec_MPIDense(Mat, PetscInt, Vec *);
     43: PETSC_INTERN PetscErrorCode MatDenseRestoreColumnVecWrite_MPIDense(Mat, PetscInt, Vec *);
     44: PETSC_INTERN PetscErrorCode MatDenseRestoreColumnVecRead_MPIDense(Mat, PetscInt, Vec *);
     45: PETSC_INTERN PetscErrorCode MatDenseRestoreColumnVec_MPIDense(Mat, PetscInt, Vec *);

     47: PETSC_INTERN PetscErrorCode MatCreate_MPIDense(Mat);
     48: PETSC_INTERN PetscErrorCode MatGetDiagonal_MPIDense(Mat, Vec);

     50: #if PetscDefined(HAVE_CUDA)
     51: PETSC_INTERN PetscErrorCode MatConvert_MPIDense_MPIDenseCUDA(Mat, MatType, MatReuse, Mat *);
     52: #endif

     54: #if PetscDefined(HAVE_HIP)
     55: PETSC_INTERN PetscErrorCode MatConvert_MPIDense_MPIDenseHIP(Mat, MatType, MatReuse, Mat *);
     56: #endif