Actual source code: dvecimpl.h

      1: #pragma once

      3: /*
      4:   This should not be included in users code.

      6:   Includes definition of structure for sequential vectors

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

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

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

     22: PETSC_INTERN PetscErrorCode VecMaxPointwiseDivide_Seq(Vec, Vec, PetscReal *);
     23: PETSC_INTERN PetscErrorCode VecReplaceArray_Seq(Vec, const PetscScalar *);
     24: PETSC_INTERN PetscErrorCode VecDuplicate_Seq(Vec, Vec *);
     25: PETSC_INTERN PetscErrorCode VecSetOption_Seq(Vec, VecOption, PetscBool);
     26: PETSC_INTERN PetscErrorCode VecGetValues_Seq(Vec, PetscInt, const PetscInt *, PetscScalar *);
     27: PETSC_INTERN PetscErrorCode VecSetValues_Seq(Vec, PetscInt, const PetscInt *, const PetscScalar *, InsertMode);
     28: PETSC_INTERN PetscErrorCode VecSetValuesBlocked_Seq(Vec, PetscInt, const PetscInt *, const PetscScalar *, InsertMode);
     29: PETSC_INTERN PetscErrorCode VecGetSize_Seq(Vec, PetscInt *);
     30: PETSC_INTERN PetscErrorCode VecPointwiseMax_Seq(Vec, Vec, Vec);
     31: PETSC_INTERN PetscErrorCode VecPointwiseMaxAbs_Seq(Vec, Vec, Vec);
     32: PETSC_INTERN PetscErrorCode VecPointwiseMin_Seq(Vec, Vec, Vec);
     33: PETSC_INTERN PetscErrorCode VecCreate_Seq(Vec);

     35: PETSC_INTERN PetscErrorCode VecCreate_Seq_Private(Vec, const PetscScalar[]);
     36: PETSC_INTERN PetscErrorCode VecSetPreallocationCOO_Seq(Vec, PetscCount, const PetscInt[]);
     37: PETSC_INTERN PetscErrorCode VecSetValuesCOO_Seq(Vec, const PetscScalar[], InsertMode);

     39: PETSC_INTERN PetscErrorCode VecMDot_Seq(Vec, PetscInt, const Vec[], PetscScalar *);
     40: PETSC_INTERN PetscErrorCode VecMTDot_Seq(Vec, PetscInt, const Vec[], PetscScalar *);
     41: PETSC_INTERN PetscErrorCode VecSet_Seq(Vec, PetscScalar);
     42: PETSC_INTERN PetscErrorCode VecMAXPY_Seq(Vec, PetscInt, const PetscScalar *, Vec *);
     43: PETSC_INTERN PetscErrorCode VecAYPX_Seq(Vec, PetscScalar, Vec);
     44: PETSC_INTERN PetscErrorCode VecWAXPY_Seq(Vec, PetscScalar, Vec, Vec);
     45: PETSC_INTERN PetscErrorCode VecAXPBYPCZ_Seq(Vec, PetscScalar, PetscScalar, PetscScalar, Vec, Vec);
     46: PETSC_INTERN PetscErrorCode VecPlaceArray_Seq(Vec, const PetscScalar *);
     47: PETSC_INTERN PetscErrorCode VecResetArray_Seq(Vec);
     48: PETSC_INTERN PetscErrorCode VecDot_Seq(Vec, Vec, PetscScalar *);
     49: PETSC_INTERN PetscErrorCode VecTDot_Seq(Vec, Vec, PetscScalar *);
     50: PETSC_INTERN PetscErrorCode VecScale_Seq(Vec, PetscScalar);
     51: PETSC_INTERN PetscErrorCode VecAXPBY_Seq(Vec, PetscScalar, PetscScalar, Vec);
     52: PETSC_INTERN PetscErrorCode VecMin_Seq(Vec, PetscInt *, PetscReal *);
     53: PETSC_INTERN PetscErrorCode VecMax_Seq(Vec, PetscInt *, PetscReal *);
     54: PETSC_INTERN PetscErrorCode VecNorm_Seq(Vec, NormType, PetscReal *);
     55: PETSC_INTERN PetscErrorCode VecDestroy_Seq(Vec);
     56: PETSC_INTERN PetscErrorCode VecCopy_Seq(Vec, Vec);
     57: PETSC_INTERN PetscErrorCode VecSwap_Seq(Vec, Vec);
     58: PETSC_INTERN PetscErrorCode VecConjugate_Seq(Vec);
     59: PETSC_INTERN PetscErrorCode VecSetRandom_Seq(Vec, PetscRandom);
     60: PETSC_INTERN PetscErrorCode VecPointwiseMult_Seq(Vec, Vec, Vec);
     61: PETSC_INTERN PetscErrorCode VecPointwiseDivide_Seq(Vec, Vec, Vec);
     62: PETSC_INTERN PetscErrorCode VecAXPY_Seq(Vec, PetscScalar, Vec);
     63: PETSC_INTERN PetscErrorCode VecReplaceArray_Default_GEMV_Error(Vec, const PetscScalar *);

     65: PETSC_INTERN PetscErrorCode VecMDot_Seq_GEMV(Vec, PetscInt, const Vec[], PetscScalar *);
     66: PETSC_INTERN PetscErrorCode VecMTDot_Seq_GEMV(Vec, PetscInt, const Vec[], PetscScalar *);
     67: PETSC_INTERN PetscErrorCode VecMAXPY_Seq_GEMV(Vec, PetscInt, const PetscScalar *, Vec *);