Lines Matching refs:garray1

238 +  n1          - size of garray1[], the first set
239 . garray1[n1] - a sorted global index array (without duplicates)
244 + n2 - size of garray2[], the merged set, which combines garray1[] and indices[]
246 . map[n1] - allocated by caller. It gives garray1[i] = garray2[map[i]]
251 garray1[5] = {1, 4, 7, 8, 10}
259 And we have map[] to connect "garray1[i] = garray2[map[i]], i=[0,n1)"
265 static PetscErrorCode ReduceTwoSetsOfGlobalIndices(PetscInt n1, const PetscInt *garray1, PetscInt m, PetscInt *indices, PetscInt *n2_, PetscInt **garray2_, PetscInt *map)
280 for (PetscInt i = 0; i < n1; i++) { // insert those in garray1[]
281 PetscCall(PetscHMapIGetWithDefault(g2l, garray1[i], -1, &val));
282 if (val < 0) PetscCall(PetscHMapISet(g2l, garray1[i], tot++));
307 // Record the map that maps garray1[i] to garray2[map[i]]
308 for (PetscInt i = 0; i < n1; i++) PetscCall(PetscHMapIGetWithDefault(g2l, garray1[i], -1, &map[i]));
329 . garray1[n1] - global column indices of Eo. Here n1 is Eo's column size.
335 + map[n1] - allocated by caller. It maps garray1[] to garray2[]. See more at ReduceTwoSetsOfGlobalIndices().
339 When reuse = MAT_REUSE_MATRIX, cstart, cend, garray1, ownerSF, map are not significant.
342 static PetscErrorCode MatMPIAIJKokkosReduceBegin(MPI_Comm comm, KokkosCsrMatrix A, KokkosCsrMatrix B, PetscInt cstart, PetscInt cend, const PetscInt *garray1, PetscSF ownerSF, MatReuse reuse, PetscInt *map, MatMatStruct_AtB *mm)
373 if (garray1[*it] < cstart) { // map local to global
454 buf[j] = garray1[Bj[Bi[i] + j]]; // left B, in global
458 buf[j] = garray1[Bj[Bi[i] + j - alen]]; // right B, in global
594 // Combine global column indices in garray1[] and Foj[]
597 PetscCall(ReduceTwoSetsOfGlobalIndices(n1, garray1, Fonz, Foj, &n2, &garray2, map));
674 static PetscErrorCode MatMPIAIJKokkosReduceEnd(MPI_Comm comm, KokkosCsrMatrix A, KokkosCsrMatrix B, PetscInt cstart, PetscInt cend, const PetscInt *garray1, PetscSF ownerSF, MatReuse reuse, PetscInt *map, MatMatStruct_AtB *mm)
722 column indices that E's off-diag block has. Let's say there are n1 such indices stored in garray1[]. We will reduce them along with
732 + map[n1] - allocated by caller. It maps garray1[] to garray2[]. See more at ReduceTwoSetsOfGlobalIndices.
752 const PetscInt *garray1 = empi->garray; // its size is n1
905 // Reduce global indices in Foj[] and garray1[] into local ones
907 PetscCall(ReduceTwoSetsOfGlobalIndices(n1, garray1, Fonz, Foj, &n2, &garray2, map));