| /petsc/include/ |
| H A D | petscbt.h | 11 static inline size_t PetscBTIndex_Internal(PetscCount index) in PetscBTIndex_Internal() 16 static inline PetscByte PetscBTMask_Internal(PetscCount index) in PetscBTMask_Internal() 21 static inline size_t PetscBTLength(PetscCount m) in PetscBTLength() 26 static inline PetscErrorCode PetscBTMemzero(PetscCount m, PetscBT array) in PetscBTMemzero() 36 static inline PetscErrorCode PetscBTCreate(PetscCount m, PetscBT *array) in PetscBTCreate() 41 static inline PetscErrorCode PetscBTCopy(PetscBT dest, PetscCount m, PetscBT source) in PetscBTCopy() 46 static inline PetscByte PetscBTLookup(PetscBT array, PetscCount index) in PetscBTLookup() 51 static inline PetscErrorCode PetscBTSet(PetscBT array, PetscCount index) in PetscBTSet() 58 static inline PetscErrorCode PetscBTNegate(PetscBT array, PetscCount index) in PetscBTNegate() 65 static inline PetscErrorCode PetscBTClear(PetscBT array, PetscCount index) in PetscBTClear() [all …]
|
| H A D | petscsys.h | 2382 PETSC_EXTERN PetscErrorCode PetscSortedInt(PetscCount, const PetscInt[], PetscBool *); 2383 PETSC_EXTERN PetscErrorCode PetscSortedInt64(PetscCount, const PetscInt64[], PetscBool *); 2384 PETSC_EXTERN PetscErrorCode PetscSortedMPIInt(PetscCount, const PetscMPIInt[], PetscBool *); 2385 PETSC_EXTERN PetscErrorCode PetscSortedReal(PetscCount, const PetscReal[], PetscBool *); 2386 PETSC_EXTERN PetscErrorCode PetscSortInt(PetscCount, PetscInt[]); 2387 PETSC_EXTERN PetscErrorCode PetscSortInt64(PetscCount, PetscInt64[]); 2388 PETSC_EXTERN PetscErrorCode PetscSortCount(PetscCount, PetscCount[]); 2389 PETSC_EXTERN PetscErrorCode PetscSortReverseInt(PetscCount, PetscInt[]); 2391 PETSC_EXTERN PetscErrorCode PetscSortedCheckDupsInt(PetscCount, const PetscInt[], PetscBool *); 2392 PETSC_EXTERN PetscErrorCode PetscSortedCheckDupsCount(PetscCount, const PetscCount[], PetscBool *); [all …]
|
| H A D | petscviewer.h | 256 …tscErrorCode PetscViewerBinaryReadAll(PetscViewer, void *, PetscCount, PetscCount, PetscCount, Pet… 257 …rCode PetscViewerBinaryWriteAll(PetscViewer, const void *, PetscCount, PetscCount, PetscCount, Pet…
|
| /petsc/src/sys/classes/viewer/impls/socket/mex-scripts/ |
| H A D | bread.c | 17 static void SYByteSwapInt(int *buff, PetscCount n) in SYByteSwapInt() 21 for (PetscCount j = 0; j < n; j++) { in SYByteSwapInt() 23 for (PetscCount i = 0; i < sizeof(int); i++) ptr2[i] = ptr1[sizeof(int) - 1 - i]; in SYByteSwapInt() 30 static void SYByteSwapShort(short *buff, PetscCount n) in SYByteSwapShort() 34 for (PetscCount j = 0; j < n; j++) { in SYByteSwapShort() 36 for (PetscCount i = 0; i < sizeof(short); i++) ptr2[i] = ptr1[sizeof(int) - 1 - i]; in SYByteSwapShort() 44 static void SYByteSwapScalar(PetscScalar *buff, PetscCount n) in SYByteSwapScalar() 51 for (PetscCount j = 0; j < n; j++) { in SYByteSwapScalar() 53 for (PetscCount i = 0; i < sizeof(double); i++) ptr2[i] = ptr1[sizeof(double) - 1 - i]; in SYByteSwapScalar() 79 PetscErrorCode PetscBinaryRead(int fd, void *p, PetscCount n, PetscInt *dummy, PetscDataType type) in PetscBinaryRead() [all …]
|
| /petsc/src/vec/is/utils/ |
| H A D | kdtree.c | 13 PetscCount greater_handle, less_equal_handle; // Handle (index) of the child nodes of the tree 18 …PetscCount indices_handle, coords_handle; // Index into the indices or coordinates array for the p… 26 PetscCount root_handle; 28 PetscCount num_coords, num_leaves, num_stems, num_bucket_indices; 32 PetscCount *bucket_indices; 91 static inline int PetscKDTreeSortFunc(PetscCount left, PetscCount right, PetscKDTree tree, uint8_t … in PetscKDTreeSortFunc() 109 …return PetscKDTreeSortFunc(*(PetscCount *)l, *(PetscCount *)r, kd_ctx->tree, kd_ctx->initial_axis); in PetscKDTreeTimSort() 112 …VerifySortedIndices(PetscKDTree tree, PetscCount sorted_indices[], PetscCount temp[], PetscCount s… in PetscKDTreeVerifySortedIndices() 114 PetscCount num_coords = tree->num_coords, range_size = end - start, location; in PetscKDTreeVerifySortedIndices() 123 for (PetscCount i = start; i < end; i++) { in PetscKDTreeVerifySortedIndices() [all …]
|
| /petsc/src/sys/fileio/ |
| H A D | sysio.c | 21 static PetscErrorCode PetscByteSwapEnum(PetscEnum *buff, PetscCount n) in PetscByteSwapEnum() 23 PetscCount i, j; in PetscByteSwapEnum() 30 for (i = 0; i < (PetscCount)sizeof(PetscEnum); i++) ptr2[i] = ptr1[sizeof(PetscEnum) - 1 - i]; in PetscByteSwapEnum() 31 for (i = 0; i < (PetscCount)sizeof(PetscEnum); i++) ptr1[i] = ptr2[i]; in PetscByteSwapEnum() 40 static PetscErrorCode PetscByteSwapBool(PetscBool *buff, PetscCount n) in PetscByteSwapBool() 42 PetscCount i, j; in PetscByteSwapBool() 49 for (i = 0; i < (PetscCount)sizeof(PetscBool); i++) ptr2[i] = ptr1[sizeof(PetscBool) - 1 - i]; in PetscByteSwapBool() 50 for (i = 0; i < (PetscCount)sizeof(PetscBool); i++) ptr1[i] = ptr2[i]; in PetscByteSwapBool() 59 static PetscErrorCode PetscByteSwapInt(PetscInt *buff, PetscCount n) in PetscByteSwapInt() 61 PetscCount i, j; in PetscByteSwapInt() [all …]
|
| /petsc/src/mat/impls/aij/mpi/mpihipsparse/ |
| H A D | mpiaijhipsparse.hip.cxx | 44 static PetscErrorCode MatSetPreallocationCOO_MPIAIJHIPSPARSE(Mat mat, PetscCount coo_n, PetscInt co… in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 89 PetscCallHIP(hipMalloc((void **)&coo_d->Ajmap1, (coo_h->Annz + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 90 PetscCallHIP(hipMalloc((void **)&coo_d->Aperm1, coo_h->Atot1 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 91 PetscCallHIP(hipMalloc((void **)&coo_d->Bjmap1, (coo_h->Bnnz + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 92 PetscCallHIP(hipMalloc((void **)&coo_d->Bperm1, coo_h->Btot1 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 93 PetscCallHIP(hipMalloc((void **)&coo_d->Aimap2, coo_h->Annz2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 94 PetscCallHIP(hipMalloc((void **)&coo_d->Ajmap2, (coo_h->Annz2 + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 95 PetscCallHIP(hipMalloc((void **)&coo_d->Aperm2, coo_h->Atot2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 96 PetscCallHIP(hipMalloc((void **)&coo_d->Bimap2, coo_h->Bnnz2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() 97 PetscCallHIP(hipMalloc((void **)&coo_d->Bjmap2, (coo_h->Bnnz2 + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJHIPSPARSE() [all …]
|
| /petsc/src/mat/impls/aij/mpi/mpicusparse/ |
| H A D | mpiaijcusparse.cu | 44 static PetscErrorCode MatSetPreallocationCOO_MPIAIJCUSPARSE(Mat mat, PetscCount coo_n, PetscInt coo… in MatSetPreallocationCOO_MPIAIJCUSPARSE() 89 PetscCallCUDA(cudaMalloc((void **)&coo_d->Ajmap1, (coo_h->Annz + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 90 PetscCallCUDA(cudaMalloc((void **)&coo_d->Aperm1, coo_h->Atot1 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 91 PetscCallCUDA(cudaMalloc((void **)&coo_d->Bjmap1, (coo_h->Bnnz + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 92 PetscCallCUDA(cudaMalloc((void **)&coo_d->Bperm1, coo_h->Btot1 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 93 PetscCallCUDA(cudaMalloc((void **)&coo_d->Aimap2, coo_h->Annz2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 94 PetscCallCUDA(cudaMalloc((void **)&coo_d->Ajmap2, (coo_h->Annz2 + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 95 PetscCallCUDA(cudaMalloc((void **)&coo_d->Aperm2, coo_h->Atot2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 96 PetscCallCUDA(cudaMalloc((void **)&coo_d->Bimap2, coo_h->Bnnz2 * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() 97 PetscCallCUDA(cudaMalloc((void **)&coo_d->Bjmap2, (coo_h->Bnnz2 + 1) * sizeof(PetscCount))); in MatSetPreallocationCOO_MPIAIJCUSPARSE() [all …]
|
| /petsc/src/sys/utils/ |
| H A D | sorti.c | 155 PetscCount i, j, p, l, r, hi = n - 1; \ 178 PetscCount i, j, p, l, r, hi = n - 1; \ 200 PetscCount i, j, p, l, r, hi = n - 1; \ 222 PetscCount i, j, p, l, r, hi = n - 1; \ 258 PetscErrorCode PetscSortedInt(PetscCount n, const PetscInt X[], PetscBool *sorted) in PetscSortedInt() 283 PetscErrorCode PetscSortedInt64(PetscCount n, const PetscInt64 X[], PetscBool *sorted) in PetscSortedInt64() 310 PetscErrorCode PetscSortInt(PetscCount n, PetscInt X[]) in PetscSortInt() 337 PetscErrorCode PetscSortInt64(PetscCount n, PetscInt64 X[]) in PetscSortInt64() 339 PetscCount pivot, t1; in PetscSortInt64() 363 PetscErrorCode PetscSortCount(PetscCount n, PetscCount X[]) in PetscSortCount() [all …]
|
| H A D | segbuffer.c | 5 PetscCount alloc; /* number of units allocated */ 6 PetscCount used; 7 PetscCount tailused; 22 static PetscErrorCode PetscSegBufferAlloc_Private(PetscSegBuffer seg, PetscCount count) in PetscSegBufferAlloc_Private() 24 PetscCount alloc; in PetscSegBufferAlloc_Private() 30 …alloc = PetscMax(s->used + count, PetscMin(1000000 / ((PetscCount)seg->unitbytes) + 1, s->alloc + … in PetscSegBufferAlloc_Private() 58 PetscErrorCode PetscSegBufferCreate(size_t unitbytes, PetscCount expected, PetscSegBuffer *seg) in PetscSegBufferCreate() 90 PetscErrorCode PetscSegBufferGet(PetscSegBuffer seg, PetscCount count, void *buf) in PetscSegBufferGet() 253 PetscErrorCode PetscSegBufferGetSize(PetscSegBuffer seg, PetscCount *usedsize) in PetscSegBufferGetSize() 273 PetscErrorCode PetscSegBufferUnuse(PetscSegBuffer seg, PetscCount unused) in PetscSegBufferUnuse()
|
| H A D | sortd.c | 33 PetscErrorCode PetscSortedReal(PetscCount n, const PetscReal X[], PetscBool *sorted) in PetscSortedReal() 41 static PetscErrorCode PetscSortReal_Private(PetscReal *v, PetscCount right) in PetscSortReal_Private() 43 PetscCount i, last; in PetscSortReal_Private() 86 PetscErrorCode PetscSortReal(PetscCount n, PetscReal v[]) in PetscSortReal() 92 for (PetscCount k = 0; k < n; k++) { in PetscSortReal() 94 for (PetscCount j = k + 1; j < n; j++) { in PetscSortReal() 121 static PetscErrorCode PetscSortRealWithArrayInt_Private(PetscReal *v, PetscInt *V, PetscCount right) in PetscSortRealWithArrayInt_Private() 123 PetscCount i, last; in PetscSortRealWithArrayInt_Private() 163 PetscErrorCode PetscSortRealWithArrayInt(PetscCount n, PetscReal r[], PetscInt Ii[]) in PetscSortRealWithArrayInt() 165 PetscCount j, k; in PetscSortRealWithArrayInt() [all …]
|
| /petsc/src/vec/vec/impls/mpi/ |
| H A D | pvecimpl.h | 46 PetscCount coo_n; 47 PetscCount tot1; /* Total local entries in COO arrays */ 48 …PetscCount *jmap1; /* [m+1]: i-th entry of the vector has jmap1[i+1]-jmap1[i] repeats in COO array… 49 PetscCount *perm1; /* [tot1]: permutation array for local entries */ 51 PetscCount nnz2; /* Unique entries in recvbuf */ 52 PetscCount *imap2; /* [nnz2]: i-th unique entry in recvbuf is imap2[i]-th entry in the vector */ 53 PetscCount *jmap2; /* [nnz2+1] */ 54 PetscCount *perm2; /* [recvlen] */ 57 PetscCount sendlen, recvlen; /* Lengths (in unit of PetscScalar) of send/recvbuf */ 58 …PetscCount *Cperm; /* [sendlen]: permutation array to fill sendbuf[]. 'C' for communi… [all …]
|
| H A D | pdvec.c | 895 PetscErrorCode VecSetPreallocationCOO_MPI(Vec x, PetscCount coo_n, const PetscInt coo_i[]) in VecSetPreallocationCOO_MPI() 899 PetscCount k, p, q, rem; /* Loop variables over coo arrays */ in VecSetPreallocationCOO_MPI() 915 PetscCount n1 = coo_n, nneg, *perm; in VecSetPreallocationCOO_MPI() 948 PetscCount tot1, *jmap1, *perm1; in VecSetPreallocationCOO_MPI() 958 PetscCount *Cperm; in VecSetPreallocationCOO_MPI() 1046 PetscCount *perm2; in VecSetPreallocationCOO_MPI() 1057 PetscCount *imap2; in VecSetPreallocationCOO_MPI() 1058 PetscCount *jmap2, nnz2; in VecSetPreallocationCOO_MPI() 1061 PetscCount sendlen = n1 - rem, recvlen = n2; in VecSetPreallocationCOO_MPI() 1116 const PetscCount *jmap1 = vmpi->jmap1; in VecSetValuesCOO_MPI() [all …]
|
| /petsc/src/vec/vec/impls/ |
| H A D | dvecimpl.h | 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 arr… 18 …PetscCount *jmap1; /* [m+1]: perm1[jmap1[i]..jmap1[i+1]) give indices of entries in v[] associated… 19 PetscCount *perm1; /* [tot1]: The permutation array in sorting coo_i[] */ 36 PETSC_INTERN PetscErrorCode VecSetPreallocationCOO_Seq(Vec, PetscCount, const PetscInt[]);
|
| /petsc/src/mat/impls/aij/mpi/ |
| H A D | mpiaij.h | 77 PetscCount n; /* Number of COOs passed to MatSetPreallocationCOO)() */ 79 PetscCount Annz, Bnnz; /* Number of entries in diagonal A and off-diagonal B */ 80 …PetscCount Annz2, Bnnz2; /* Number of unique remote entries belonging to A and B */ 81 …PetscCount Atot1, Atot2, Btot1, Btot2; /* Total local (tot1) and remote (tot2) entries (which mi… 82 PetscCount *Ajmap1, *Aperm1; /* Lengths: [Annz+1], [Atot1]. Local entries to diag */ 83 …PetscCount *Bjmap1, *Bperm1; /* Lengths: [Bnnz+1], [Btot1]. Local entries to offdiag */ 84 …PetscCount *Aimap2, *Ajmap2, *Aperm2; /* Lengths: [Annz2], [Annz2+1], [Atot2]. Remote entries t… 85 …PetscCount *Bimap2, *Bjmap2, *Bperm2; /* Lengths: [Bnnz2], [Bnnz2+1], [Btot2]. Remote entries t… 86 …PetscCount *Cperm1; /* [sendlen] Permutation to fill MPI send buffer. 'C' for… 183 PETSC_INTERN PetscErrorCode MatSetPreallocationCOO_MPIAIJ(Mat, PetscCount, PetscInt[], PetscInt[]);
|
| /petsc/src/sys/classes/viewer/utils/ |
| H A D | btview.c | 5 PetscErrorCode PetscBTView(PetscCount m, const PetscBT bt, PetscViewer viewer) in PetscBTView() 10 …for (PetscCount i = 0; i < m; ++i) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "%" PetscC… in PetscBTView()
|
| /petsc/include/petsc/private/ |
| H A D | petscdsimpl.h | 30 PetscCount start; /* Starting entry of the chunk in an array (in bytes) */ 31 PetscCount size; /* Current number of entries of the chunk */ 32 PetscCount reserved; /* Number of reserved entries in the chunk */ 36 PetscCount size; /* Current number of entries used in array */
|
| /petsc/src/vec/vec/impls/mpi/cupm/ |
| H A D | vecmpicupm_impl.hpp | 236 inline PetscErrorCode VecMPI_CUPM<T>::SetPreallocationCOO(Vec x, PetscCount ncoo, const PetscInt co… in SetPreallocationCOO() 276 … void pack_coo_values(const PetscScalar *PETSC_RESTRICT vv, PetscCount nnz, const PetscCount *PETS… in pack_coo_values() 278 …Petsc::device::cupm::kernels::util::grid_stride_1D(nnz, [=](PetscCount i) { buf[i] = vv[perm[i]]; … in pack_coo_values() 282 …*PETSC_RESTRICT vv, PetscCount nnz2, const PetscCount *PETSC_RESTRICT imap2, const PetscCount *PET… in add_remote_coo_values() 284 …add_coo_values_impl(vv, nnz2, jmap2, perm2, ADD_VALUES, xv, [=](PetscCount i) { return imap2[i]; }… in add_remote_coo_values()
|
| /petsc/src/sys/classes/viewer/impls/vtk/ |
| H A D | vtkvimpl.h | 21 PETSC_EXTERN PetscErrorCode PetscViewerVTKFWrite(PetscViewer, FILE *, const void *, PetscCount, MPI… 49 static inline PetscErrorCode PetscVTKIntCast(PetscCount a, PetscVTKInt *b) in PetscVTKIntCast()
|
| H A D | vtkv.c | 288 PetscErrorCode PetscViewerVTKFWrite(PetscViewer viewer, FILE *fp, const void *data, PetscCount n, M… in PetscViewerVTKFWrite() 310 for (PetscCount i = 0; i < n; i++) tmp[i] = ttmp[i]; in PetscViewerVTKFWrite() 321 …k((PetscCount)count == n, PETSC_COMM_SELF, PETSC_ERR_FILE_WRITE, "Wrote %" PetscCount_FMT "/%" Pet… in PetscViewerVTKFWrite()
|
| /petsc/src/vec/vec/impls/seq/cupm/ |
| H A D | vecseqcupm.hpp | 135 static PetscErrorCode SetPreallocationCOO(Vec, PetscCount, const PetscInt[]) noexcept; 143 …mpl(const PetscScalar *PETSC_RESTRICT vv, PetscCount n, const PetscCount *PETSC_RESTRICT jmap, con… in add_coo_values_impl() 145 ::Petsc::device::cupm::kernels::util::grid_stride_1D(n, [=](PetscCount i) { in add_coo_values_impl() 164 …ues(const PetscScalar *PETSC_RESTRICT v, PetscCount n, const PetscCount *PETSC_RESTRICT jmap1, con… in add_coo_values() 166 add_coo_values_impl(v, n, jmap1, perm1, imode, xv, [](PetscCount i) { return i; }); in add_coo_values()
|
| /petsc/src/vec/is/utils/tests/ |
| H A D | ex1.c | 54 PetscCount *indices; in main() 67 PetscCount *indices; in main() 106 …eQuery %.6e for %" PetscCount_FMT " queries\n", query_perf_info.time, (PetscCount)num_points_queri… in main()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex55k.kokkos.cxx | 17 using PetscCountKokkosView = Kokkos::View<PetscCount *, DefaultMemorySpace>; 202 PetscCount ncoo = ((PetscCount)xm) * ((PetscCount)ym) * 5; in FormJacobianLocalVec() 264 …, Iterate::Right>>(exec, {ys, xs}, {ys + ym, xs + xm}), KOKKOS_LAMBDA(PetscCount j, PetscCount i) { in FormJacobianLocalVec()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexgmsh.c | 212 static PetscErrorCode GmshBufferGet(GmshFile *gmsh, PetscCount count, size_t eltsize, void *buf) in GmshBufferGet() 229 static PetscErrorCode GmshBufferSizeGet(GmshFile *gmsh, PetscCount count, void *buf) in GmshBufferSizeGet() 247 static PetscErrorCode GmshRead(GmshFile *gmsh, void *buf, PetscCount count, PetscDataType dtype) in GmshRead() 258 static PetscErrorCode GmshReadString(GmshFile *gmsh, char *buf, PetscCount count) in GmshReadString() 314 static PetscErrorCode GmshReadPetscInt(GmshFile *gmsh, PetscInt *buf, PetscCount count) in GmshReadPetscInt() 316 PetscCount i; in GmshReadPetscInt() 344 static PetscErrorCode GmshReadPetscCount(GmshFile *gmsh, PetscCount *buf, PetscCount count) in GmshReadPetscCount() 346 PetscCount i; in GmshReadPetscCount() 350 if (dataSize == sizeof(PetscCount)) { in GmshReadPetscCount() 356 for (i = 0; i < count; ++i) buf[i] = (PetscCount)ibuf[i]; in GmshReadPetscCount() [all …]
|
| /petsc/src/ts/interface/ |
| H A D | tshistory.c | 7 PetscCount n; /* current number of steps registered */ 9 PetscCount c; /* current capacity of history */ 10 PetscCount s; /* reallocation size */
|