Home
last modified time | relevance | path

Searched refs:imode (Results 1 – 25 of 30) sorted by relevance

12

/petsc/src/dm/impls/redundant/
H A Ddmredundant.c87 static PetscErrorCode DMLocalToGlobalBegin_Redundant(DM dm, Vec l, InsertMode imode, Vec g) in DMLocalToGlobalBegin_Redundant() argument
98 switch (imode) { in DMLocalToGlobalBegin_Redundant()
107 if (imode == ADD_VALUES) in DMLocalToGlobalBegin_Redundant()
110 if (imode == MAX_VALUES) in DMLocalToGlobalBegin_Redundant()
115 …PetscCallMPI(MPI_Reduce(source, gv, iN, MPIU_SCALAR, (imode == ADD_VALUES) ? MPIU_SUM : MPIU_MAX, … in DMLocalToGlobalBegin_Redundant()
128 static PetscErrorCode DMLocalToGlobalEnd_Redundant(DM dm, Vec l, InsertMode imode, Vec g) in DMLocalToGlobalEnd_Redundant() argument
134 static PetscErrorCode DMGlobalToLocalBegin_Redundant(DM dm, Vec g, InsertMode imode, Vec l) in DMGlobalToLocalBegin_Redundant() argument
144 switch (imode) { in DMGlobalToLocalBegin_Redundant()
158 static PetscErrorCode DMGlobalToLocalEnd_Redundant(DM dm, Vec g, InsertMode imode, Vec l) in DMGlobalToLocalEnd_Redundant() argument
/petsc/src/snes/utils/
H A Ddmdasnes.c232 PetscErrorCode DMDASNESSetFunctionLocal(DM dm, InsertMode imode, PetscErrorCode (*func)(DMDALocalIn… in DMDASNESSetFunctionLocal() argument
242 dmdasnes->residuallocalimode = imode; in DMDASNESSetFunctionLocal()
274 PetscErrorCode DMDASNESSetFunctionLocalVec(DM dm, InsertMode imode, PetscErrorCode (*func)(DMDALoca… in DMDASNESSetFunctionLocalVec() argument
284 dmdasnes->residuallocalimode = imode; in DMDASNESSetFunctionLocalVec()
553 PetscErrorCode DMDASNESSetPicardLocal(DM dm, InsertMode imode, PetscErrorCode (*func)(DMDALocalInfo… in DMDASNESSetPicardLocal() argument
563 dmdasnes->residuallocalimode = imode; in DMDASNESSetPicardLocal()
/petsc/src/mat/impls/aij/mpi/mpihipsparse/
H A Dmpiaijhipsparse.hip.cxx127 __global__ static void MatAddLocalCOOValues(const PetscScalar kv[], InsertMode imode, PetscCount An… in MatAddLocalCOOValues() argument
135 Aa[i] = (imode == INSERT_VALUES ? 0.0 : Aa[i]) + sum; in MatAddLocalCOOValues()
139 Ba[i] = (imode == INSERT_VALUES ? 0.0 : Ba[i]) + sum; in MatAddLocalCOOValues()
158 …ic PetscErrorCode MatSetValuesCOO_MPIAIJHIPSPARSE(Mat mat, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_MPIAIJHIPSPARSE() argument
197 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJHIPSPARSE()
216 …dim3((Annz + Bnnz + 255) / 256), dim3(256), 0, PetscDefaultHipStream, v1, imode, Annz, Ajmap1, Ape… in MatSetValuesCOO_MPIAIJHIPSPARSE()
228 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJHIPSPARSE()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DDMComposite.pyx115 def gather(self, Vec gvec, imode: InsertModeSpec, lvecs: Sequence[Vec]) -> None:
124 imode
134 cdef PetscInsertMode cimode = insertmode(imode)
/petsc/src/mat/impls/aij/mpi/mpicusparse/
H A Dmpiaijcusparse.cu127 __global__ static void MatAddLocalCOOValues(const PetscScalar kv[], InsertMode imode, PetscCount An… in MatAddLocalCOOValues() argument
135 Aa[i] = (imode == INSERT_VALUES ? 0.0 : Aa[i]) + sum; in MatAddLocalCOOValues()
139 Ba[i] = (imode == INSERT_VALUES ? 0.0 : Ba[i]) + sum; in MatAddLocalCOOValues()
158 …tic PetscErrorCode MatSetValuesCOO_MPIAIJCUSPARSE(Mat mat, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_MPIAIJCUSPARSE() argument
197 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJCUSPARSE()
216 …MatAddLocalCOOValues<<<(int)((Annz + Bnnz + 255) / 256), 256>>>(v1, imode, Annz, Ajmap1, Aperm1, A… in MatSetValuesCOO_MPIAIJCUSPARSE()
228 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJCUSPARSE()
/petsc/src/mat/utils/
H A Dgcreate.c613 PetscErrorCode MatSetValuesCOO_Basic(Mat A, const PetscScalar coo_v[], InsertMode imode) in MatSetValuesCOO_Basic() argument
630 if (imode != ADD_VALUES) PetscCall(MatZeroEntries(A)); in MatSetValuesCOO_Basic()
808 PetscErrorCode MatSetValuesCOO(Mat A, const PetscScalar coo_v[], InsertMode imode) in MatSetValuesCOO() argument
817 PetscValidLogicalCollectiveEnum(A, imode, 3); in MatSetValuesCOO()
821 …PetscCall((*f)(A, coo_v, imode)); // all known COO implementations do not use MatStash. They do th… in MatSetValuesCOO()
825 …PetscCall(MatSetValuesCOO_Basic(A, coo_v, imode)); // fall back to MatSetValues, which might use M… in MatSetValuesCOO()
/petsc/src/vec/vec/impls/seq/cupm/
H A Dvecseqcupm.hpp143 …t *PETSC_RESTRICT jmap, const PetscCount *PETSC_RESTRICT perm, InsertMode imode, PetscScalar *PETS… in add_coo_values_impl() argument
152 if (imode == INSERT_VALUES) { in add_coo_values_impl()
164 …*PETSC_RESTRICT jmap1, const PetscCount *PETSC_RESTRICT perm1, InsertMode imode, PetscScalar *PETS… in add_coo_values() argument
166 add_coo_values_impl(v, n, jmap1, perm1, imode, xv, [](PetscCount i) { return i; }); in add_coo_values()
H A Dvecseqcupm_impl.hpp2247 inline PetscErrorCode VecSeq_CUPM<T>::SetValuesCOO(Vec x, const PetscScalar v[], InsertMode imode) … in SetValuesCOO() argument
2268 …, stream, kernels::add_coo_values, vv, n, vcu->jmap1_d, vcu->perm1_d, imode, imode == INSERT_VALUE… in SetValuesCOO()
/petsc/src/ts/utils/
H A Ddmdats.c235 PetscErrorCode DMDATSSetRHSFunctionLocal(DM dm, InsertMode imode, DMDATSRHSFunctionLocalFn *func, P… in DMDATSSetRHSFunctionLocal() argument
244 dmdats->rhsfunctionlocalimode = imode; in DMDATSSetRHSFunctionLocal()
297 PetscErrorCode DMDATSSetIFunctionLocal(DM dm, InsertMode imode, DMDATSIFunctionLocalFn *func, Petsc… in DMDATSSetIFunctionLocal() argument
306 dmdats->ifunctionlocalimode = imode; in DMDATSSetIFunctionLocal()
/petsc/src/vec/vec/impls/mpi/cupm/
H A Dvecmpicupm_impl.hpp318 inline PetscErrorCode VecMPI_CUPM<T>::SetValuesCOO(Vec x, const PetscScalar v[], InsertMode imode) … in SetValuesCOO() argument
333 …const auto xv = imode == INSERT_VALUES ? DeviceArrayWrite(dctx, x).data() : DeviceArrayRead… in SetValuesCOO()
354 …unchKernel1D(n, 0, stream, kernels::add_coo_values, vv, n, vcu->jmap1_d, vcu->perm1_d, imode, xv)); in SetValuesCOO()
/petsc/src/vec/vec/impls/mpi/kokkos/
H A Dmpikok.kokkos.cxx150 static PetscErrorCode VecSetValuesCOO_MPIKokkos(Vec x, const PetscScalar v[], InsertMode imode) in VecSetValuesCOO_MPIKokkos() argument
180 if (imode == INSERT_VALUES) PetscCall(VecGetKokkosViewWrite(x, &xv)); /* write vector */ in VecSetValuesCOO_MPIKokkos()
187 xv(i) = (imode == INSERT_VALUES ? 0.0 : xv(i)) + sum; in VecSetValuesCOO_MPIKokkos()
198 if (imode == INSERT_VALUES) PetscCall(VecRestoreKokkosViewWrite(x, &xv)); in VecSetValuesCOO_MPIKokkos()
/petsc/src/vec/vec/impls/mpi/
H A Dpbvec.c318 InsertMode imode = (InsertMode)x->recvhdr[i].insertmode; in VecAssemblyEnd_MPI_BTS() local
338 switch (imode) { in VecAssemblyEnd_MPI_BTS()
346 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_SUP, "Insert mode not supported 0x%x", imode); in VecAssemblyEnd_MPI_BTS()
360 switch (imode) { in VecAssemblyEnd_MPI_BTS()
368 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_SUP, "Insert mode not supported 0x%x", imode); in VecAssemblyEnd_MPI_BTS()
H A Dpdvec.c1111 PetscErrorCode VecSetValuesCOO_MPI(Vec x, const PetscScalar v[], InsertMode imode) in VecSetValuesCOO_MPI() argument
1137 a[i] = (imode == INSERT_VALUES ? 0.0 : a[i]) + sum; in VecSetValuesCOO_MPI()
/petsc/src/mat/impls/elemental/
H A Dmatelem.cxx107 …const PetscInt *rows, PetscInt nc, const PetscInt *cols, const PetscScalar *vals, InsertMode imode) in MatSetValues_Elemental() argument
129 …PetscCheck(imode == ADD_VALUES, PETSC_COMM_SELF, PETSC_ERR_SUP, "Only ADD_VALUES to off-processor … in MatSetValues_Elemental()
134 switch (imode) { in MatSetValues_Elemental()
142 …ETERRQ(PetscObjectComm((PetscObject)A), PETSC_ERR_SUP, "No support for InsertMode %d", (int)imode); in MatSetValues_Elemental()
176 …PetscCheck(imode == ADD_VALUES, PETSC_COMM_SELF, PETSC_ERR_SUP, "Only ADD_VALUES to off-processor … in MatSetValues_Elemental()
181 switch (imode) { in MatSetValues_Elemental()
189 …ETERRQ(PetscObjectComm((PetscObject)A), PETSC_ERR_SUP, "No support for InsertMode %d", (int)imode); in MatSetValues_Elemental()
/petsc/src/ksp/pc/impls/is/
H A Dpcis.c547 PetscErrorCode PCISScatterArrayNToVecB(PC pc, PetscScalar *array_N, Vec v_B, InsertMode imode, Scat… in PCISScatterArrayNToVecB() argument
559 if (imode == INSERT_VALUES) { in PCISScatterArrayNToVecB()
565 if (imode == INSERT_VALUES) { in PCISScatterArrayNToVecB()
/petsc/src/dm/impls/composite/
H A Dpack.c624 PetscErrorCode DMCompositeGather(DM dm, InsertMode imode, Vec gvec, ...) in DMCompositeGather() argument
651 PetscCall(DMLocalToGlobalBegin(next->dm, local, imode, global)); in DMCompositeGather()
652 PetscCall(DMLocalToGlobalEnd(next->dm, local, imode, global)); in DMCompositeGather()
682 PetscErrorCode DMCompositeGatherArray(DM dm, InsertMode imode, Vec gvec, Vec *lvecs) in DMCompositeGatherArray() argument
705 PetscCall(DMLocalToGlobalBegin(next->dm, lvecs[i], imode, global)); in DMCompositeGatherArray()
706 PetscCall(DMLocalToGlobalEnd(next->dm, lvecs[i], imode, global)); in DMCompositeGatherArray()
/petsc/src/vec/vec/interface/
H A Dvector.c280 PetscErrorCode VecSetValuesCOO(Vec x, const PetscScalar coo_v[], InsertMode imode) in VecSetValuesCOO() argument
285 PetscValidLogicalCollectiveEnum(x, imode, 3); in VecSetValuesCOO()
288 PetscUseTypeMethod(x, setvaluescoo, coo_v, imode); in VecSetValuesCOO()
302 if (imode != ADD_VALUES) PetscCall(VecZeroEntries(x)); in VecSetValuesCOO()
/petsc/src/mat/impls/scalapack/
H A Dmatscalapack.c113 …const PetscInt *rows, PetscInt nc, const PetscInt *cols, const PetscScalar *vals, InsertMode imode) in MatSetValues_ScaLAPACK() argument
121 …scCheck(imode == INSERT_VALUES || imode == ADD_VALUES, PetscObjectComm((PetscObject)A), PETSC_ERR_… in MatSetValues_ScaLAPACK()
131 switch (imode) { in MatSetValues_ScaLAPACK()
140 switch (imode) { in MatSetValues_ScaLAPACK()
152 … cols + j, roworiented ? vals + i * nc + j : vals + i + j * nr, (PetscBool)(imode == ADD_VALUES))); in MatSetValues_ScaLAPACK()
/petsc/src/mat/impls/aij/mpi/kokkos/
H A Dmpiaijkok.kokkos.cxx1577 static PetscErrorCode MatSetValuesCOO_MPIAIJKokkos(Mat mat, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_MPIAIJKokkos() argument
1618 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJKokkos()
1638 Aa(i) = (imode == INSERT_VALUES ? 0.0 : Aa(i)) + sum; in MatSetValuesCOO_MPIAIJKokkos()
1642 Ba(i) = (imode == INSERT_VALUES ? 0.0 : Ba(i)) + sum; in MatSetValuesCOO_MPIAIJKokkos()
1659 if (imode == INSERT_VALUES) { in MatSetValuesCOO_MPIAIJKokkos()
/petsc/src/vec/vec/impls/seq/
H A Dbvec2.c617 PetscErrorCode VecSetValuesCOO_Seq(Vec x, const PetscScalar coo_v[], InsertMode imode) in VecSetValuesCOO_Seq() argument
630 xv[i] = (imode == INSERT_VALUES ? 0.0 : xv[i]) + sum; in VecSetValuesCOO_Seq()
/petsc/src/vec/vec/impls/seq/kokkos/
H A Dveckok.kokkos.cxx1574 static PetscErrorCode VecSetValuesCOO_SeqKokkos(Vec x, const PetscScalar v[], InsertMode imode) in VecSetValuesCOO_SeqKokkos() argument
1594 if (imode == INSERT_VALUES) PetscCall(VecGetKokkosViewWrite(x, &xv)); /* write vector */ in VecSetValuesCOO_SeqKokkos()
1601 xv(i) = (imode == INSERT_VALUES ? 0.0 : xv(i)) + sum; in VecSetValuesCOO_SeqKokkos()
1604 if (imode == INSERT_VALUES) PetscCall(VecRestoreKokkosViewWrite(x, &xv)); in VecSetValuesCOO_SeqKokkos()
/petsc/src/mat/impls/aij/seq/kokkos/
H A Daijkok.kokkos.cxx1393 static PetscErrorCode MatSetValuesCOO_SeqAIJKokkos(Mat A, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_SeqAIJKokkos() argument
1417 …if (imode == INSERT_VALUES) PetscCall(MatSeqAIJGetKokkosViewWrite(A, &Aa)); /* write matrix values… in MatSetValuesCOO_SeqAIJKokkos()
1425 Aa(i) = (imode == INSERT_VALUES ? 0.0 : Aa(i)) + sum; in MatSetValuesCOO_SeqAIJKokkos()
1429 if (imode == INSERT_VALUES) PetscCall(MatSeqAIJRestoreKokkosViewWrite(A, &Aa)); in MatSetValuesCOO_SeqAIJKokkos()
/petsc/src/mat/impls/aij/seq/seqhipsparse/
H A Daijhipsparse.hip.cxx3770 …etscCount nnz, const PetscCount jmap[], const PetscCount perm[], InsertMode imode, PetscScalar a[]) in MatAddCOOValues() argument
3777 a[i] = (imode == INSERT_VALUES ? 0.0 : a[i]) + sum; in MatAddCOOValues()
3781 …atic PetscErrorCode MatSetValuesCOO_SeqAIJHIPSPARSE(Mat A, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_SeqAIJHIPSPARSE() argument
3804 if (imode == INSERT_VALUES) PetscCall(MatSeqAIJHIPSPARSEGetArrayWrite(A, &Aa)); in MatSetValuesCOO_SeqAIJHIPSPARSE()
3809 …nnz + 255) / 256), dim3(256), 0, PetscDefaultHipStream, v1, Annz, coo->jmap, coo->perm, imode, Aa); in MatSetValuesCOO_SeqAIJHIPSPARSE()
3814 if (imode == INSERT_VALUES) PetscCall(MatSeqAIJHIPSPARSERestoreArrayWrite(A, &Aa)); in MatSetValuesCOO_SeqAIJHIPSPARSE()
/petsc/src/mat/impls/aij/seq/seqcusparse/
H A Daijcusparse.cu4413 …etscCount nnz, const PetscCount jmap[], const PetscCount perm[], InsertMode imode, PetscScalar a[]) in MatAddCOOValues() argument
4420 a[i] = (imode == INSERT_VALUES ? 0.0 : a[i]) + sum; in MatAddCOOValues()
4424 static PetscErrorCode MatSetValuesCOO_SeqAIJCUSPARSE(Mat A, const PetscScalar v[], InsertMode imode) in MatSetValuesCOO_SeqAIJCUSPARSE() argument
4447 if (imode == INSERT_VALUES) PetscCall(MatSeqAIJCUSPARSEGetArrayWrite(A, &Aa)); in MatSetValuesCOO_SeqAIJCUSPARSE()
4452 MatAddCOOValues<<<((int)(Annz + 255) / 256), 256>>>(v1, Annz, coo->jmap, coo->perm, imode, Aa); in MatSetValuesCOO_SeqAIJCUSPARSE()
4457 if (imode == INSERT_VALUES) PetscCall(MatSeqAIJCUSPARSERestoreArrayWrite(A, &Aa)); in MatSetValuesCOO_SeqAIJCUSPARSE()
/petsc/src/mat/impls/hypre/
H A Dmhypre.c2361 static PetscErrorCode MatSetValuesCOO_HYPRE(Mat mat, const PetscScalar v[], InsertMode imode) argument
2367 PetscCall(MatSetValuesCOO(hmat->cooMat, v, imode));

12