Actual source code: dvecimpl.h

  1: /*
  2:    This should not be included in users code.

  4:   Includes definition of structure for sequential vectors

  6:   These are shared by dvec1.c dvec2.c dvec3.c bvec1.c bvec2.c pvec.c pbvec.c
  7: */

  9: #ifndef PETSC_DVECIMPL_H
 10: #define PETSC_DVECIMPL_H

 12: #include <petsc/private/vecimpl.h>

 14: typedef struct {
 15:   VECHEADER
 16:   /* VecSetValuesCOO() related fields on host. m is the vector's local size */
 17:   PetscCount  coo_n; /* Number of entries in VecSetPreallocationCOO() */
 18:   PetscCount  tot1;  /* Total number of valid (i.e., w/ non-negative indices) entries in the COO array */
 19:   PetscCount *jmap1; /* [m+1]: perm1[jmap1[i]..jmap1[i+1]) give indices of entries in v[] associated with i-th nonzero of the vector */
 20:   PetscCount *perm1; /* [tot1]: The permutation array in sorting coo_i[] */
 21: } Vec_Seq;

 23: PETSC_INTERN PetscErrorCode VecMDot_Seq(Vec, PetscInt, const Vec[], PetscScalar *);
 24: PETSC_INTERN PetscErrorCode VecMTDot_Seq(Vec, PetscInt, const Vec[], PetscScalar *);
 25: PETSC_INTERN PetscErrorCode VecMin_Seq(Vec, PetscInt *, PetscReal *);
 26: PETSC_INTERN PetscErrorCode VecSet_Seq(Vec, PetscScalar);
 27: PETSC_INTERN PetscErrorCode VecMAXPY_Seq(Vec, PetscInt, const PetscScalar *, Vec *);
 28: PETSC_INTERN PetscErrorCode VecAYPX_Seq(Vec, PetscScalar, Vec);
 29: PETSC_INTERN PetscErrorCode VecWAXPY_Seq(Vec, PetscScalar, Vec, Vec);
 30: PETSC_INTERN PetscErrorCode VecAXPBYPCZ_Seq(Vec, PetscScalar, PetscScalar, PetscScalar, Vec, Vec);
 31: PETSC_INTERN PetscErrorCode VecMaxPointwiseDivide_Seq(Vec, Vec, PetscReal *);
 32: PETSC_INTERN PetscErrorCode VecPlaceArray_Seq(Vec, const PetscScalar *);
 33: PETSC_INTERN PetscErrorCode VecResetArray_Seq(Vec);
 34: PETSC_INTERN PetscErrorCode VecReplaceArray_Seq(Vec, const PetscScalar *);
 35: PETSC_INTERN PetscErrorCode VecDot_Seq(Vec, Vec, PetscScalar *);
 36: PETSC_INTERN PetscErrorCode VecTDot_Seq(Vec, Vec, PetscScalar *);
 37: PETSC_INTERN PetscErrorCode VecScale_Seq(Vec, PetscScalar);
 38: PETSC_INTERN PetscErrorCode VecAXPY_Seq(Vec, PetscScalar, Vec);
 39: PETSC_INTERN PetscErrorCode VecAXPBY_Seq(Vec, PetscScalar, PetscScalar, Vec);
 40: PETSC_INTERN PetscErrorCode VecMax_Seq(Vec, PetscInt *, PetscReal *);
 41: PETSC_INTERN PetscErrorCode VecNorm_Seq(Vec, NormType, PetscReal *);
 42: PETSC_INTERN PetscErrorCode VecDestroy_Seq(Vec);
 43: PETSC_INTERN PetscErrorCode VecDuplicate_Seq(Vec, Vec *);
 44: PETSC_INTERN PetscErrorCode VecSetOption_Seq(Vec, VecOption, PetscBool);
 45: PETSC_INTERN PetscErrorCode VecGetValues_Seq(Vec, PetscInt, const PetscInt *, PetscScalar *);
 46: PETSC_INTERN PetscErrorCode VecSetValues_Seq(Vec, PetscInt, const PetscInt *, const PetscScalar *, InsertMode);
 47: PETSC_INTERN PetscErrorCode VecSetValuesBlocked_Seq(Vec, PetscInt, const PetscInt *, const PetscScalar *, InsertMode);
 48: PETSC_INTERN PetscErrorCode VecGetSize_Seq(Vec, PetscInt *);
 49: PETSC_INTERN PetscErrorCode VecCopy_Seq(Vec, Vec);
 50: PETSC_INTERN PetscErrorCode VecSwap_Seq(Vec, Vec);
 51: PETSC_INTERN PetscErrorCode VecConjugate_Seq(Vec);
 52: PETSC_INTERN PetscErrorCode VecSetRandom_Seq(Vec, PetscRandom);
 53: PETSC_INTERN PetscErrorCode VecPointwiseMult_Seq(Vec, Vec, Vec);
 54: PETSC_INTERN PetscErrorCode VecPointwiseMax_Seq(Vec, Vec, Vec);
 55: PETSC_INTERN PetscErrorCode VecPointwiseMaxAbs_Seq(Vec, Vec, Vec);
 56: PETSC_INTERN PetscErrorCode VecPointwiseMin_Seq(Vec, Vec, Vec);
 57: PETSC_INTERN PetscErrorCode VecPointwiseDivide_Seq(Vec, Vec, Vec);

 59: PETSC_EXTERN PetscErrorCode VecCreate_Seq(Vec);
 60: PETSC_INTERN PetscErrorCode VecCreate_Seq_Private(Vec, const PetscScalar[]);
 61: PETSC_INTERN PetscErrorCode VecSetPreallocationCOO_Seq(Vec, PetscCount, const PetscInt[]);
 62: PETSC_INTERN PetscErrorCode VecSetValuesCOO_Seq(Vec, const PetscScalar[], InsertMode);
 63: #endif // PETSC_DVECIMPL_H