| /petsc/src/mat/tests/ |
| H A D | ex201f.F90 | 157 MatOperation op 174 op = MATOP_MULT 175 PetscCallA(MatShellSetOperation(m, op, mymatmult, ierr)) 176 op = MATOP_MULT_ADD 177 PetscCallA(MatShellSetOperation(m, op, mymatmultadd, ierr)) 178 op = MATOP_MULT_TRANSPOSE 179 PetscCallA(MatShellSetOperation(m, op, mymatmulttranspose, ierr)) 180 op = MATOP_MULT_HERMITIAN_TRANSPOSE 181 PetscCallA(MatShellSetOperation(m, op, mymatmulthermitiantranspose, ierr)) 182 op = MATOP_MULT_TRANSPOSE_ADD [all …]
|
| /petsc/src/vec/is/sf/impls/basic/ |
| H A D | sfpack.c | 15 #define OP_BINARY(op, s, t) \ argument 17 (s) = (s)op(t); \ 19 #define OP_FUNCTION(op, s, t) \ argument 21 (s) = op((s), (t)); \ 23 #define OP_LXOR(op, s, t) \ argument 27 #define OP_ASSIGN(op, s, t) \ argument 32 #define OP_XLOC(op, s, t) \ argument 35 else if (!((s).u op(t).u)) s = t; \ 420 …const void *rootdata, PetscMemType leafmtype, const void *leafdata, MPI_Op op, PetscSFOperation sf… in PetscSFLinkCreate() argument 429 …PetscCall(PetscSFLinkCreate_NVSHMEM(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, sfop, … in PetscSFLinkCreate() [all …]
|
| H A D | sfbasic.c | 352 …t, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op) in PetscSFBcastBegin_Basic() argument 358 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Basic() 364 PetscCall(PetscSFLinkScatterLocal(sf, link, PETSCSF_ROOT2LEAF, (void *)rootdata, leafdata, op)); in PetscSFBcastBegin_Basic() 368 …tscSFBcastEnd_Basic(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, MPI_Op op) in PetscSFBcastEnd_Basic() argument 378 PetscCall(PetscSFLinkUnpackLeafData(sf, link, PETSCSF_REMOTE, leafdata, op)); in PetscSFBcastEnd_Basic() 385 …type, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op, PetscSFOperation sf… in PetscSFLeafToRootBegin_Basic() argument 390 PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, sfop, &link)); in PetscSFLeafToRootBegin_Basic() 398 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Basic() argument 403 …PetscCall(PetscSFLeafToRootBegin_Basic(sf, unit, leafmtype, leafdata, rootmtype, rootdata, op, PET… in PetscSFReduceBegin_Basic() 404 PetscCall(PetscSFLinkScatterLocal(sf, link, PETSCSF_LEAF2ROOT, rootdata, (void *)leafdata, op)); in PetscSFReduceBegin_Basic() [all …]
|
| /petsc/src/mat/impls/shell/ftn-custom/ |
| H A D | zshellf.c | 197 static PetscErrorCode ourduplicate(Mat mat, MatDuplicateOption op, Mat *M) in ourduplicate() argument 200 …ode *))(((PetscObject)mat)->fortran_func_pointers[FORTRAN_MATOP_DUPLICATE]))(&mat, &op, M, &ierr)); in ourduplicate() 204 PETSC_EXTERN void matshellsetoperation_(Mat *mat, MatOperation *op, PetscErrorCode (*f)(Mat *, Vec … in matshellsetoperation_() argument 212 switch (*op) { in matshellsetoperation_() 214 …*ierr = MatShellSetOperation(*mat, *op, (… in matshellsetoperation_() 218 … = MatShellSetOperation(*mat, *op, (PetscErrorCodeFn *… in matshellsetoperation_() 222 … = MatShellSetOperation(*mat, *op, (PetscErrorCodeFn *… in matshellsetoperation_() 226 … = MatShellSetOperation(*mat, *op, (PetscErrorCodeFn *… in matshellsetoperation_() 230 … = MatShellSetOperation(*mat, *op, (PetscErrorCodeFn *… in matshellsetoperation_() 234 … = MatShellSetOperation(*mat, *op, (PetscErrorCodeFn *… in matshellsetoperation_() [all …]
|
| /petsc/include/petsc/private/ |
| H A D | cupmatomics.hpp | 66 AtomicInsert<double> op; in operator ()() local 67 z[0] = op(xp[0], yp[0]); in operator ()() 68 z[1] = op(xp[1], yp[1]); in operator ()() 78 AtomicInsert<double> op; in operator ()() local 79 return op(xp[0], yp[0]); in operator ()() 166 AtomicAdd<PetscReal> op; in operator ()() local 167 z[0] = op(xp[0], yp[0]); in operator ()() 168 z[1] = op(xp[1], yp[1]); in operator ()() 420 Op op; in operator ()() local 423 old = atomicCAS(address_as_int, assumed, (int)(op((Type)assumed, y))); in operator ()() [all …]
|
| /petsc/src/vec/is/sf/interface/ftn-custom/ |
| H A D | zsf.c | 89 …egin_(PetscSF *sf, MPI_Fint *unit, const void *rptr, void *lptr, MPI_Fint *op, PetscErrorCode *ier… in petscsfbcastbegin_() argument 92 MPI_Op cop = MPI_Op_f2c(*op); in petscsfbcastbegin_() 99 …tend_(PetscSF *sf, MPI_Fint *unit, const void *rptr, void *lptr, MPI_Fint *op, PetscErrorCode *ier… in petscsfbcastend_() argument 102 MPI_Op cop = MPI_Op_f2c(*op); in petscsfbcastend_() 109 …egin_(PetscSF *sf, MPI_Fint *unit, const void *lptr, void *rptr, MPI_Fint *op, PetscErrorCode *ier… in petscsfreducebegin_() argument 112 MPI_Op cop = MPI_Op_f2c(*op); in petscsfreducebegin_() 119 …eend_(PetscSF *sf, MPI_Fint *unit, const void *lptr, void *rptr, MPI_Fint *op, PetscErrorCode *ier… in petscsfreduceend_() argument 122 MPI_Op cop = MPI_Op_f2c(*op); in petscsfreduceend_() 131 …PetscSF *sf, MPI_Fint *unit, F90Array1d *rptr, F90Array1d *lptr, MPI_Fint *op, PetscErrorCode *ier… in petscsfbcastbegin_() argument 136 MPI_Op cop = MPI_Op_f2c(*op); in petscsfbcastbegin_() [all …]
|
| /petsc/src/vec/ftn-mod/ |
| H A D | petscvec.h90 | 2 subroutine PetscSFBcastBegin(sf, unit, rarray, larray, op, ierr) 11 MPIU_Op :: op 17 subroutine PetscSFBcastEnd(sf, unit, rarray, larray, op, ierr) 26 MPIU_Op :: op 32 subroutine PetscSFReduceBegin(sf, unit, larray, rarray, op, ierr) 41 MPIU_Op :: op 47 subroutine PetscSFReduceEnd(sf, unit, larray, rarray, op, ierr) 56 MPIU_Op :: op
|
| /petsc/src/dm/label/impls/ephemeral/ |
| H A D | dmlabeleph.c | 19 PetscInt Np = 0, Nop, op, v; in DMLabelEphemeralComputeStratumSize_Private() local 30 for (op = 0; op < Nop; ++op) { in DMLabelEphemeralComputeStratumSize_Private() 31 const PetscInt point = opoints[op]; in DMLabelEphemeralComputeStratumSize_Private() 55 PetscInt Np, p, Nop, op; in DMLabelGetStratumIS_Ephemeral() local 67 for (op = 0, p = 0; op < Nop; ++op) { in DMLabelGetStratumIS_Ephemeral() 68 const PetscInt point = opoints[op]; in DMLabelGetStratumIS_Ephemeral()
|
| /petsc/src/ksp/ksp/impls/hpddm/ |
| H A D | hpddm.cxx | 108 HPDDM::PETScOperator *op = data->op; in KSPView_HPDDM() local 109 const PetscScalar *array = op ? op->storage() : nullptr; in KSPView_HPDDM() 114 if (op && ascii) { in KSPView_HPDDM() 144 data->op = new HPDDM::PETScOperator(ksp, n); in KSPSetUp_HPDDM() 199 delete data->op; in KSPReset_HPDDM() 200 data->op = nullptr; in KSPReset_HPDDM() 222 const PetscInt N = data->op->getDof() * n; in KSPSolve_HPDDM_Private() 263 …OV_METHOD_GCRODR || data->cntl[0] == HPDDM_KRYLOV_METHOD_BGCRODR) && data->op->storage()) ksp->gue… in KSPSolve_HPDDM_Private() 272 …PetscCall(HPDDM::IterativeMethod::solve(*data->op, high[0], high[1], n, PetscObjectComm((PetscObje… in KSPSolve_HPDDM_Private() 299 …PetscCall(HPDDM::IterativeMethod::solve(*data->op, low[0], low[1], n, PetscObjectComm((PetscObject… in KSPSolve_HPDDM_Private() [all …]
|
| /petsc/src/dm/interface/ |
| H A D | dmceed.c | 179 …PetscCallCEED(CeedOperatorCreate(ceed, sd->qf, CEED_QFUNCTION_NONE, CEED_QFUNCTION_NONE, &sd->op)); in DMCeedCreateGeometry() 180 PetscCallCEED(CeedOperatorSetField(sd->op, "x", sd->er, sd->basis, CEED_VECTOR_ACTIVE)); in DMCeedCreateGeometry() 181 PetscCallCEED(CeedOperatorSetField(sd->op, "dx", sd->er, sd->basis, CEED_VECTOR_ACTIVE)); in DMCeedCreateGeometry() 182 …PetscCallCEED(CeedOperatorSetField(sd->op, "weight", CEED_ELEMRESTRICTION_NONE, sd->basis, CEED_VE… in DMCeedCreateGeometry() 183 PetscCallCEED(CeedOperatorSetField(sd->op, "qdata", *erq, CEED_BASIS_NONE, CEED_VECTOR_ACTIVE)); in DMCeedCreateGeometry() 242 …PetscCallCEED(CeedOperatorCreate(ceed, sd->qf, CEED_QFUNCTION_NONE, CEED_QFUNCTION_NONE, &sd->op)); in DMCeedCreate_Internal() 243 PetscCallCEED(CeedOperatorSetField(sd->op, "u", sd->er, sd->basis, CEED_VECTOR_ACTIVE)); in DMCeedCreate_Internal() 244 PetscCallCEED(CeedOperatorSetField(sd->op, "du", sd->er, sd->basis, CEED_VECTOR_ACTIVE)); in DMCeedCreate_Internal() 245 PetscCallCEED(CeedOperatorSetField(sd->op, "qdata", sd->erq, CEED_BASIS_NONE, sd->qd)); in DMCeedCreate_Internal() 246 PetscCallCEED(CeedOperatorSetField(sd->op, "v", sd->er, sd->basis, CEED_VECTOR_ACTIVE)); in DMCeedCreate_Internal() [all …]
|
| /petsc/src/vec/is/sf/impls/basic/allgatherv/ |
| H A D | sfallgatherv.c | 102 …t, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op) in PetscSFBcastBegin_Allgatherv() argument 112 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Allgatherv() 129 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Allgatherv() argument 140 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_REDUCE… in PetscSFReduceBegin_Allgatherv() 141 if (op == MPI_REPLACE) { in PetscSFReduceBegin_Allgatherv() 176 PetscCallMPI(MPIU_Reduce(leafbuf, rootbuf, nleavesi, baseunit, op, dat->bcast_root, comm)); in PetscSFReduceBegin_Allgatherv() 178 … PetscCallMPI(MPIU_Ireduce(leafbuf, rootbuf, nleavesi, baseunit, op, dat->bcast_root, comm, req)); in PetscSFReduceBegin_Allgatherv() 188 …eafbuf_alloc[PETSCSF_REMOTE][link->leafmtype_mpi], count, link->basicunit, op, 0, comm)); /* Must … in PetscSFReduceBegin_Allgatherv() 195 …educeEnd_Allgatherv(PetscSF sf, MPI_Datatype unit, const void *leafdata, void *rootdata, MPI_Op op) in PetscSFReduceEnd_Allgatherv() argument 200 if (op == MPI_REPLACE) { in PetscSFReduceEnd_Allgatherv() [all …]
|
| /petsc/src/vec/is/sf/tests/ |
| H A D | ex3.c | 15 MPI_Op op = MPI_SUM; in main() local 30 op = MPI_REPLACE; in main() 33 op = MPIU_SUM; in main() 74 PetscCall(PetscSFFetchAndOpBegin(gathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 75 PetscCall(PetscSFFetchAndOpEnd(gathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 129 PetscCall(PetscSFFetchAndOpBegin(allgathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 130 PetscCall(PetscSFFetchAndOpEnd(allgathersf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 190 PetscCall(PetscSFFetchAndOpBegin(alltoallsf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main() 191 PetscCall(PetscSFFetchAndOpEnd(alltoallsf, MPIU_SCALAR, rootdata, leafdata, leafupdate, op)); in main()
|
| H A D | ex4k.kokkos.cxx | 47 MPI_Op op = MPI_REPLACE; in main() local 137 … PetscCall(PetscSFBcastWithMemTypeBegin(sf[j], MPIU_SCALAR, mtype, rootdata, mtype, leafdata, op)); in main() 138 PetscCall(PetscSFBcastEnd(sf[j], MPIU_SCALAR, rootdata, leafdata, op)); in main() 139 …PetscCall(PetscSFReduceWithMemTypeBegin(sf[j], MPIU_SCALAR, mtype, leafdata, mtype, rootdata, op)); in main() 140 PetscCall(PetscSFReduceEnd(sf[j], MPIU_SCALAR, leafdata, rootdata, op)); in main()
|
| /petsc/src/vec/is/sf/tests/output/ |
| H A D | ex3_2.out | 2 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_GATHER graph with op = MPI_SUM 32 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLGATHER graph with op = MPI_SUM 72 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLTOALL graph with op = MPI_SUM
|
| H A D | ex3_1.out | 2 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_GATHER graph with op = MPI_REPLACE 32 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLGATHER graph with op = MPI_REPLACE 72 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLTOALL graph with op = MPI_REPLACE
|
| H A D | ex3_4.out | 2 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_GATHER graph with op = MPI_SUM 34 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLGATHER graph with op = MPI_SUM 86 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLTOALL graph with op = MPI_SUM
|
| H A D | ex3_3.out | 2 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_GATHER graph with op = MPI_REPLACE 34 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLGATHER graph with op = MPI_REPLACE 86 Testing PetscSFFetchAndOp on a PETSCSF_PATTERN_ALLTOALL graph with op = MPI_REPLACE
|
| /petsc/include/petsc/mpiuni/ |
| H A D | mpi.h | 410 #define MPI_Op_f2c(op) (MPI_Op)(op) argument 411 #define MPI_Op_c2f(op) (MPI_Fint)(op) argument 513 …#define MPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm) (MPIUNI_ARG(op), MPIU… argument 515 …#define MPI_Reduce_local(sendbuf, recvbuf, count, datatype, op) (MPIUNI_ARG(op), MPIU… argument 517 …#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm) (MPIUNI_ARG(op), MPIU… argument 518 …#define MPI_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm, request) (MPIUNI_ARG(op), MPIU… argument 519 …#define MPI_Scan(sendbuf, recvbuf, count, datatype, op, comm) (MPIUNI_ARG(op), MPIU… argument 520 …ount, datatype, op, comm) (MPIUNI_ARG(sendbuf), MPIUNI_ARG(recvbuf), MPIUNI_ARG(count… argument 521 …#define MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm) (MPIUNI_ARG(op), MPIU… argument 522 …_Op_create(function, commute, op) (MPIUNI_ARG(function), MPIUNI_AR… argument [all …]
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | SF.pyx | 434 def bcastBegin(self, unit: Datatype, ndarray rootdata, ndarray leafdata, op: Op) -> None: 450 op 459 cdef MPI_Op cop = mpi4py_Op_Get(op) 463 def bcastEnd(self, unit: Datatype, ndarray rootdata, ndarray leafdata, op: Op) -> None: 476 op 485 cdef MPI_Op cop = mpi4py_Op_Get(op) 489 def reduceBegin(self, unit: Datatype, ndarray leafdata, ndarray rootdata, op: Op) -> None: 504 op 513 cdef MPI_Op cop = mpi4py_Op_Get(op) 517 def reduceEnd(self, unit: Datatype, ndarray leafdata, ndarray rootdata, op: Op) -> None: [all …]
|
| H A D | Comm.pyx | 38 def __richcmp__(self, other, int op): argument 41 if op!=2 and op!=3: raise TypeError("only '==' and '!='") 44 cdef int eq = (op == 2)
|
| /petsc/src/vec/is/sf/impls/basic/allgather/ |
| H A D | sfallgather.c | 31 …t, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op) in PetscSFBcastBegin_Allgather() argument 40 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_BCAST,… in PetscSFBcastBegin_Allgather() 51 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Allgather() argument 62 …PetscCall(PetscSFLinkCreate(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op, PETSCSF_REDUCE… in PetscSFReduceBegin_Allgather() 63 if (op == MPI_REPLACE) { in PetscSFReduceBegin_Allgather() 79 …eafbuf_alloc[PETSCSF_REMOTE][link->leafmtype_mpi], count, link->basicunit, op, 0, comm)); /* Must … in PetscSFReduceBegin_Allgather()
|
| /petsc/include/ |
| H A D | petscsf.h | 215 …scSFBcastAndOpBegin(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, MPI_Op op) in PetscSFBcastAndOpBegin() argument 217 return PetscSFBcastBegin(sf, unit, rootdata, leafdata, op); in PetscSFBcastAndOpBegin() 221 …etscSFBcastAndOpEnd(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, MPI_Op op) in PetscSFBcastAndOpEnd() argument 223 return PetscSFBcastEnd(sf, unit, rootdata, leafdata, op); in PetscSFBcastAndOpEnd() 227 …t, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op) in PetscSFBcastAndOpWithMemtypeBegin() argument 229 return PetscSFBcastWithMemTypeBegin(sf, unit, rootmtype, rootdata, leafmtype, leafdata, op); in PetscSFBcastAndOpWithMemtypeBegin()
|
| /petsc/src/ksp/ksp/impls/hpddm/cuda/ |
| H A D | hpddm.cu | 9 const PetscInt N = data->op->getDof() * n; in KSPSolve_HPDDM_CUDA_Private() 31 PetscCall(HPDDM::IterativeMethod::solve(*data->op, host_ptr, host_ptr + N, n, comm)); in KSPSolve_HPDDM_CUDA_Private() 44 PetscCall(HPDDM::IterativeMethod::solve(*data->op, host_ptr, host_ptr + N, n, comm)); in KSPSolve_HPDDM_CUDA_Private()
|
| /petsc/src/ksp/pc/impls/pbjacobi/cuda/ |
| H A D | pbjacobi_cuda.cu | 33 static PetscErrorCode PCApplyOrTranspose_PBJacobi_CUDA(PC pc, Vec x, Vec y, cublasOperation_t op) in PCApplyOrTranspose_PBJacobi_CUDA() argument 51 …PetscCallCUBLAS(cublasXgemvStridedBatched(handle, op, bs, bs, &alpha, A, bs, bs * bs, xx, 1, bs, &… in PCApplyOrTranspose_PBJacobi_CUDA() 54 …MatMultBatched<<<gridSize, 256>>>(bs, mbs, A, xx, yy, op == CUBLAS_OP_T ? PETSC_TRUE : PETSC_FALSE… in PCApplyOrTranspose_PBJacobi_CUDA()
|
| /petsc/src/vec/is/sf/impls/window/ |
| H A D | sfwindow.c | 44 static PetscErrorCode PetscSFWindowOpTranslate(MPI_Op *op) in PetscSFWindowOpTranslate() argument 47 if (*op == MPIU_SUM) *op = MPI_SUM; in PetscSFWindowOpTranslate() 48 else if (*op == MPIU_MAX) *op = MPI_MAX; in PetscSFWindowOpTranslate() 49 else if (*op == MPIU_MIN) *op = MPI_MIN; in PetscSFWindowOpTranslate() 1001 …t, PetscMemType rootmtype, const void *rootdata, PetscMemType leafmtype, void *leafdata, MPI_Op op) in PetscSFBcastBegin_Window() argument 1012 …PetscCheck(op == MPI_REPLACE, PetscObjectComm((PetscObject)sf), PETSC_ERR_SUP, "PetscSFBcastBegin_… in PetscSFBcastBegin_Window() 1035 …scSFBcastEnd_Window(PetscSF sf, MPI_Datatype unit, const void *rootdata, void *leafdata, MPI_Op op) in PetscSFBcastEnd_Window() argument 1056 …t, PetscMemType leafmtype, const void *leafdata, PetscMemType rootmtype, void *rootdata, MPI_Op op) in PetscSFReduceBegin_Window() argument 1068 PetscCall(PetscSFWindowOpTranslate(&op)); in PetscSFReduceBegin_Window() 1075 … PetscCallMPI(MPI_Accumulate((void *)leafdata, 1, mine[i], ranks[i], tdp, 1, remote[i], op, win)); in PetscSFReduceBegin_Window() [all …]
|