Home
last modified time | relevance | path

Searched refs:mask (Results 1 – 25 of 51) sorted by relevance

123

/petsc/src/ksp/pc/impls/tfs/
H A Dcomm.c64 PetscInt mask, edge; in PCTFS_giop() local
104 for (mask = 1, edge = 0; edge < PCTFS_i_log2_num_nodes; edge++, mask <<= 1) { in PCTFS_giop()
105 dest = PCTFS_my_id ^ mask; in PCTFS_giop()
114 mask = PCTFS_floor_num_nodes >> 1; in PCTFS_giop()
115 for (edge = 0; edge < PCTFS_i_log2_num_nodes; edge++, mask >>= 1) { in PCTFS_giop()
116 if (PCTFS_my_id % mask) continue; in PCTFS_giop()
118 dest = PCTFS_my_id ^ mask; in PCTFS_giop()
141 PetscInt mask, edge; in PCTFS_grop() local
180 for (mask = 1, edge = 0; edge < PCTFS_i_log2_num_nodes; edge++, mask <<= 1) { in PCTFS_grop()
181 dest = PCTFS_my_id ^ mask; in PCTFS_grop()
[all …]
H A Dxxt.c466 PetscInt mask, edge, *iptr; in det_separators() local
518 …for (iptr = fo + n, id = PCTFS_my_id, mask = PCTFS_num_nodes >> 1, edge = level; edge > 0; edge--,… in det_separators()
520 PetscCall((id < mask) ? PCTFS_rvec_zero(lhs, m) : PCTFS_rvec_set(lhs, 1.0, m)); in det_separators()
524 PetscCall((id < mask) ? PCTFS_rvec_set(rhs, 1.0, m) : PCTFS_rvec_zero(rhs, m)); in det_separators()
528 if (id < mask) { in det_separators()
531 if (id >= mask) { in det_separators()
536 if (id < mask) PetscCall(PCTFS_gs_gop_hc(PCTFS_gs_handle, lhs, "+\0", edge - 1)); in det_separators()
547 if (id < mask) { in det_separators()
554 if (id >= mask) { in det_separators()
564 (id < mask) ? (sum[2] = ct) : (sum[3] = ct); in det_separators()
[all …]
H A Dbitmask.c109 char mask = 1; in PCTFS_set_bit_mask() local
124 for (i = 0; i < offset; i++) mask <<= 1; in PCTFS_set_bit_mask()
127 cptr[offset] = mask; in PCTFS_set_bit_mask()
/petsc/src/mat/graphops/order/
H A Dgenrcm.c36 …neqns, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *perm, PetscInt *mask, PetscInt *xls) in SPARSEPACKgenrcm() argument
49 mask[0] = 1; in SPARSEPACKgenrcm()
56 --mask; in SPARSEPACKgenrcm()
62 for (i = 1; i <= i__1; ++i) mask[i] = 1; in SPARSEPACKgenrcm()
67 if (!mask[i]) goto L200; in SPARSEPACKgenrcm()
74 PetscCall(SPARSEPACKfnroot(&root, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &perm[num])); in SPARSEPACKgenrcm()
75 PetscCall(SPARSEPACKrcm(&root, &xadj[1], &adjncy[1], &mask[1], &perm[num], &ccsize, &xls[1])); in SPARSEPACKgenrcm()
H A Dgen1wd.c30 … PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *nblks, P… in SPARSEPACKgen1wd() argument
46 --mask; in SPARSEPACKgen1wd()
51 for (i = 1; i <= i__1; ++i) mask[i] = 1; in SPARSEPACKgen1wd()
56 if (!mask[i]) goto L400; in SPARSEPACKgen1wd()
59 …PetscCall(SPARSEPACKfn1wd(&root, &xadj[1], &adjncy[1], &mask[1], &nsep, &perm[num + 1], &nlvl, &xl… in SPARSEPACKgen1wd()
70 if (!mask[node]) goto L300; in SPARSEPACKgen1wd()
71 …PetscCall(SPARSEPACKrootls(&node, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &perm[num + 1])); in SPARSEPACKgen1wd()
79 mask[node] = 0; in SPARSEPACKgen1wd()
H A Drootls.c24 …t PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *nlvl, Pe… in SPARSEPACKrootls() argument
38 --mask; in SPARSEPACKrootls()
42 mask[*root] = 0; in SPARSEPACKrootls()
65 if (!mask[nbr]) goto L300; in SPARSEPACKrootls()
68 mask[nbr] = 0; in SPARSEPACKrootls()
82 mask[node] = 1; in SPARSEPACKrootls()
H A Drcm.c37 …t PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *perm, Pe… in SPARSEPACKrcm() argument
53 --mask; in SPARSEPACKrcm()
57 PetscCall(SPARSEPACKdegree(root, &xadj[1], &adjncy[1], &mask[1], &deg[1], ccsize, &perm[1])); in SPARSEPACKrcm()
58 mask[*root] = 0; in SPARSEPACKrcm()
82 if (!mask[nbr]) goto L200; in SPARSEPACKrcm()
84 mask[nbr] = 0; in SPARSEPACKrcm()
H A Dgennd.c54 … PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *perm, Pe… in SPARSEPACKgennd() argument
68 --mask; in SPARSEPACKgennd()
73 for (i = 1; i <= i__1; ++i) mask[i] = 1; in SPARSEPACKgennd()
79 if (!mask[i]) goto L300; in SPARSEPACKgennd()
82 …PetscCall(SPARSEPACKfndsep(&root, &xadj[1], &adjncy[1], &mask[1], &nsep, &perm[num + 1], &xls[1], … in SPARSEPACKgennd()
H A Dfnroot.c32 …t(PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *nlvl, Pe… in SPARSEPACKfnroot() argument
45 --mask; in SPARSEPACKfnroot()
49 PetscCall(SPARSEPACKrootls(root, &xadj[1], &adjncy[1], &mask[1], nlvl, &xls[1], &ls[1])); in SPARSEPACKfnroot()
68 if (mask[nabor] > 0) ++ndeg; in SPARSEPACKfnroot()
77 PetscCall(SPARSEPACKrootls(root, &xadj[1], &adjncy[1], &mask[1], &nunlvl, &xls[1], &ls[1])); in SPARSEPACKfnroot()
H A Dfndsep.c34 …PetscInt *root, const PetscInt *inxadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *nsep, Pe… in SPARSEPACKfndsep() argument
50 --mask; in SPARSEPACKfndsep()
54 PetscCall(SPARSEPACKfnroot(root, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &ls[1])); in SPARSEPACKfndsep()
63 mask[node] = 0; in SPARSEPACKfndsep()
95 mask[node] = 0; in SPARSEPACKfndsep()
H A Dsprcm.c9 PetscInt i, *mask, *xls, nrow, *perm; in MatGetOrdering_RCM() local
17 PetscCall(PetscMalloc3(nrow, &mask, nrow, &perm, 2 * nrow, &xls)); in MatGetOrdering_RCM()
18 PetscCall(SPARSEPACKgenrcm(&nrow, ia, ja, perm, mask, xls)); in MatGetOrdering_RCM()
25 PetscCall(PetscFree3(mask, perm, xls)); in MatGetOrdering_RCM()
H A Dsp1wd.c9 PetscInt i, *mask, *xls, nblks, *xblk, *ls, nrow, *perm; in MatGetOrdering_1WD() local
17 PetscCall(PetscMalloc5(nrow, &mask, nrow + 1, &xls, nrow, &ls, nrow + 1, &xblk, nrow, &perm)); in MatGetOrdering_1WD()
18 PetscCall(SPARSEPACKgen1wd(&nrow, ia, ja, mask, &nblks, xblk, perm, xls, ls)); in MatGetOrdering_1WD()
25 PetscCall(PetscFree5(mask, xls, ls, xblk, perm)); in MatGetOrdering_1WD()
H A Dfn1wd.c30 …PetscInt *root, const PetscInt *inxadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *nsep, Pe… in SPARSEPACKfn1wd() argument
49 --mask; in SPARSEPACKfn1wd()
53 PetscCall(SPARSEPACKfnroot(root, &xadj[1], &adjncy[1], &mask[1], nlvl, &xls[1], &ls[1])); in SPARSEPACKfn1wd()
66 mask[node] = 0; in SPARSEPACKfn1wd()
101 mask[node] = 0; in SPARSEPACKfn1wd()
H A Dspnd.c9 PetscInt i, *mask, *xls, *ls, nrow, *perm; in MatGetOrdering_ND() local
21 PetscCall(PetscMalloc4(nrow, &mask, nrow, &perm, nrow + 1, &xls, nrow, &ls)); in MatGetOrdering_ND()
22 PetscCall(SPARSEPACKgennd(&nrow, ia, ja, mask, perm, xls, ls)); in MatGetOrdering_ND()
35 PetscCall(PetscFree4(mask, perm, xls, ls)); in MatGetOrdering_ND()
H A Ddegree.c26 …PetscInt *root, const PetscInt *inxadj, const PetscInt *adjncy, PetscInt *mask, PetscInt *deg, Pet… in SPARSEPACKdegree() argument
42 --mask; in SPARSEPACKdegree()
68 if (!mask[nbr]) goto L200; in SPARSEPACKdegree()
/petsc/src/vec/vec/tests/
H A Dex65.c28 PetscOffloadMask mask; in main() local
30 PetscCall(VecGetOffloadMask(global, &mask)); in main()
31 …PetscCheck(mask == PETSC_OFFLOAD_GPU, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Unexpected offload state"); in main()
39 PetscOffloadMask mask; in main() local
41 PetscCall(VecGetOffloadMask(local, &mask)); in main()
42 …PetscCheck(mask == PETSC_OFFLOAD_GPU, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Local vector has synced wi… in main()
43 PetscCall(VecGetOffloadMask(global, &mask)); in main()
44 …PetscCheck(mask == PETSC_OFFLOAD_GPU, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Global vector has synced w… in main()
/petsc/src/mat/graphops/color/impls/greedy/
H A Dgreedy.c19 … i, j, k, s, e, n, no, nd, nd_global, n_global, idx, ncols, maxcolors, masksize, ccol, *mask; in GreedyColoringLocalDistanceOne_Private() local
75 PetscCall(PetscMalloc1(masksize, &mask)); in GreedyColoringLocalDistanceOne_Private()
78 for (i = 0; i < masksize; i++) mask[i] = -1; in GreedyColoringLocalDistanceOne_Private()
103 for (k = 0; k < masksize; k++) newmask[k] = mask[k]; in GreedyColoringLocalDistanceOne_Private()
104 PetscCall(PetscFree(mask)); in GreedyColoringLocalDistanceOne_Private()
105 mask = newmask; in GreedyColoringLocalDistanceOne_Private()
108 mask[ccol] = idx; in GreedyColoringLocalDistanceOne_Private()
121 for (k = 0; k < masksize; k++) newmask[k] = mask[k]; in GreedyColoringLocalDistanceOne_Private()
122 PetscCall(PetscFree(mask)); in GreedyColoringLocalDistanceOne_Private()
123 mask = newmask; in GreedyColoringLocalDistanceOne_Private()
[all …]
/petsc/src/vec/is/is/tests/
H A Dex6.c26 PetscBool *mask; in main() local
28 PetscCall(PetscCalloc1(rend - rstart, &mask)); in main()
30 for (j = 0; j < size; j++) mask[i * (size + 2) + j] = PETSC_TRUE; in main()
32 PetscCall(ISGeneralSetIndicesFromMask(is[0], rstart, rend, mask)); in main()
33 PetscCall(PetscFree(mask)); in main()
/petsc/src/sys/tests/
H A Dex21.c13 …PetscBool mask[] = {PETSC_TRUE, PETSC_FALSE, PETSC_FALSE, PETSC_TRUE, PETSC_FALSE, PETSC_FALSE… in main() local
19 PetscCall(PetscProcessTree(n, mask, parentId, &Nlevels, &Level, &Levelcnt, &Idbylevel, &Column)); in main()
21 if (!mask[i]) PetscCall(PetscPrintf(PETSC_COMM_WORLD, " %" PetscInt_FMT " ", Level[i])); in main()
30 if (!mask[i]) PetscCall(PetscPrintf(PETSC_COMM_WORLD, " %" PetscInt_FMT " ", Column[i])); in main()
/petsc/src/ts/utils/dmplexlandau/
H A Dland_tensors.h71 …const PetscReal rp, const PetscReal zp, PetscReal Ud[][2], PetscReal Uk[][2], const PetscReal mask) in LandauTensor2D() argument
86 s = mask * 2 * r * rp / l; /* mask for vectorization */ in LandauTensor2D()
96 i1func = 4. / (PetscSqr(s) * sqrt_1s + PETSC_MACHINE_EPSILON) * mask * (ks - (1. + s) * es); in LandauTensor2D()
100 Uk[1][1] = Ud[1][1] = -pi4pow * ((r2prp2)*i2func - 2 * r * rp * i3func) * mask; in LandauTensor2D()
111 …x1[], const PetscReal xp, const PetscReal yp, const PetscReal zp, PetscReal U[][3], PetscReal mask) in LandauTensor3D() argument
119 inorm2 = mask / norm2; in LandauTensor3D()
129 …tscReal xp, const PetscReal yp, const PetscReal zp, PetscReal U[][3], PetscReal mask, PetscReal c0) in LandauTensor3DRelativistic() argument
135 if (mask == 0.0) { in LandauTensor3DRelativistic()
/petsc/src/vec/is/is/utils/
H A Disdiff.c36 PetscBT mask; in ISDifference() local
62 PetscCall(PetscBTCreate(imax - imin, &mask)); in ISDifference()
66 PetscCall(PetscBTSet(mask, i1[i] - imin)); in ISDifference()
74 PetscCall(PetscBTClear(mask, i2[i] - imin)); in ISDifference()
81 if (PetscBTLookup(mask, i)) nout++; in ISDifference()
88 if (PetscBTLookup(mask, i)) iout[nout++] = i + imin; in ISDifference()
93 PetscCall(PetscBTDestroy(&mask)); in ISDifference()
273 PetscBT mask; in ISExpand() local
323 PetscCall(PetscBTCreate(imax - imin, &mask)); in ISExpand()
327 if (!PetscBTLookupSet(mask, i1[i] - imin)) iout[nout++] = i1[i]; in ISExpand()
[all …]
/petsc/include/
H A Dpetscdevicetypes.h179 …ISCARD static inline PETSC_CONSTEXPR_14 const char *PetscOffloadMaskToString(PetscOffloadMask mask) in PetscOffloadMaskToString() argument
185 switch (mask) { in PetscOffloadMaskToString()
197 …CARD static inline PETSC_CONSTEXPR_14 PetscMemType PetscOffloadMaskToMemType(PetscOffloadMask mask) in PetscOffloadMaskToMemType() argument
199 switch (mask) { in PetscOffloadMaskToMemType()
/petsc/include/petsc/private/khash/
H A Dkhash.h237 khint_t k, i, last, mask, step = 0; \
238 mask = h->n_buckets - 1; \
239 k = __hash_func(key); i = k & mask; \
242 i = (i + (++step)) & mask; \
324 khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \
325 x = site = h->n_buckets; k = __hash_func(key); i = k & mask; \
331 i = (i + (++step)) & mask; \
/petsc/src/vec/vec/impls/mpi/cupm/cuda/
H A Dvecmpicupm.cu57 …te(Vec v, const PetscScalar **host_array, const PetscScalar **device_array, PetscOffloadMask *mask) in VecCUDAGetArrays_Private() argument
64 PetscCall(VecMPI_CUDA.GetArrays_CUPMBase(v, host_array, device_array, mask, dctx)); in VecCUDAGetArrays_Private()
/petsc/src/vec/vec/impls/mpi/cupm/hip/
H A Dvecmpicupm.hip.cxx57 …te(Vec v, const PetscScalar **host_array, const PetscScalar **device_array, PetscOffloadMask *mask) in VecHIPGetArrays_Private() argument
64 PetscCall(VecMPI_HIP.GetArrays_CUPMBase(v, host_array, device_array, mask, dctx)); in VecHIPGetArrays_Private()

123