Lines Matching refs:idx

92   int                Nblk = end - start, it, m, stride = stride_shared, idx = 0;
97 if (idx++ == nShareVec) {
103 if (idx++ == nShareVec) {
109 if (idx++ == nShareVec) {
115 if (idx++ == nShareVec) {
121 if (idx++ == nShareVec) {
127 if (idx++ == nShareVec) {
133 if (idx++ == nShareVec) {
139 if (idx++ == nShareVec) {
145 if (idx++ == nShareVec) {
151 if (idx++ == nShareVec) {
164 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &lsum) { lsum += R[idx] * PetscConj(R[idx]); }, dpi);
183 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { RP[idx] = R[idx]; });
192 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &dot) { dot += R[idx] * PetscConj(RP[idx]); }, rhoold);
194 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
195 U[idx] = R[idx];
196 P[idx] = R[idx];
197 T[idx] = Diag[idx] * P[idx];
198 D[idx] = 0;
206 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &dot) { dot += V[idx] * PetscConj(RP[idx]); }, s);
215 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
216 Q[idx] = U[idx] - a * V[idx];
217 T[idx] = U[idx] + Q[idx];
221 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { T[idx] = Diag[idx] * T[idx]; });
225 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { R[idx] = R[idx] - a * AUQ[idx]; });
227 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &lsum) { lsum += R[idx] * PetscConj(R[idx]); }, dpi);
240 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { D[idx] = U[idx] + cf * D[idx]; });
243 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { D[idx] = Q[idx] + cf * D[idx]; });
246 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { XX[idx] = XX[idx] + eta * D[idx]; });
284 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &dot) { dot += R[idx] * PetscConj(RP[idx]); }, rho);
293 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
294 U[idx] = R[idx] + b * Q[idx];
295 Q[idx] = Q[idx] + b * P[idx];
296 P[idx] = U[idx] + b * Q[idx];
300 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { T[idx] = Diag[idx] * P[idx]; });
311 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) { XX[idx] = Diag[idx] * XX[idx]; });
321 parallel_reduce(Kokkos::TeamVectorRange(team, start, end), [=](const int idx, int &lsum) { lsum += (glb_Aai[idx + 1] - glb_Aai[idx]); }, nnz);
334 int Nblk = end - start, it, stride = stride_shared, idx = 0; // start in shared mem
339 if (idx++ == nShareVec) {
345 if (idx++ == nShareVec) {
351 if (idx++ == nShareVec) {
357 if (idx++ == nShareVec) {
363 if (idx++ == nShareVec) {
369 if (idx++ == nShareVec) {
375 if (idx++ == nShareVec) {
390 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
391 Zr[idx] = Di[idx] * Rr[idx];
392 Zl[idx] = Di[idx] * Rl[idx];
396 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &lsum) { lsum += Rr[idx] * PetscConj(Rr[idx]); }, dpi);
416 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &dot) { dot += Zr[idx] * PetscConj(Rl[idx]); }, beta);
429 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
430 Pr[idx] = Zr[idx];
431 Pl[idx] = Zl[idx];
437 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
438 Pr[idx] = t1 * Pr[idx] + Zr[idx];
439 Pl[idx] = t2 * Pl[idx] + Zl[idx];
448 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &lsum) { lsum += Zr[idx] * PetscConj(Pl[idx]); }, dpi);
459 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
460 XX[idx] = XX[idx] + a * Pr[idx];
461 Rr[idx] = Rr[idx] + t1 * Zr[idx];
462 Rl[idx] = Rl[idx] + t2 * Zl[idx];
467 parallel_reduce(Kokkos::TeamVectorRange(team, Nblk), [=](const int idx, PetscScalar &lsum) { lsum += Rr[idx] * PetscConj(Rr[idx]); }, dpi);
501 parallel_for(Kokkos::TeamVectorRange(team, Nblk), [=](int idx) {
502 Zr[idx] = Di[idx] * Rr[idx];
503 Zl[idx] = Di[idx] * Rl[idx];
517 parallel_reduce(Kokkos::TeamVectorRange(team, start, end), [=](const int idx, int &lsum) { lsum += (glb_Aai[idx + 1] - glb_Aai[idx]); }, nnz);
676 for (PetscInt f = 0, idx = head; f < jac->dm_Nf[dmIdx]; f++, idx++, s++) {
679 jac->max_nits += h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its; // report total number of iterations with high verbose
680 if (h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its > max_nnit) {
681 max_nnit = h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its;
685 if (h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its > max_nnit) {
686 jac->max_nits = max_nnit = h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its;
693 for (int bid = 0; bid < batch_sz; bid++) PetscCall(PetscPrintf(PetscObjectComm((PetscObject)A), "%3" PetscInt_FMT " ", h_metadata[idx + bid * jac->dm_Nf[dmIdx]].its));
735 KOKKOS_LAMBDA(const int idx, int &lsum) {
736 if (d_metadata[idx].reason < 0) ++lsum;
805 PetscCall(ISGetIndices(isrow, &rowindices)); // local idx
842 PetscInt colB = rowindices[colsA[colj]]; // use local idx
944 for (PetscInt ii = 0, idx = 0; ii < nDMs; ii++) {
950 for (PetscInt jj = 0; jj < jac->dm_Nf[ii]; jj++, idx++) {
951 h_block_offsets[idx + 1] = h_block_offsets[idx] + nblk;
953 if (idx == 0) PetscCall(PetscInfo(pc, "Add first of %" PetscInt_FMT " blocks with %" PetscInt_FMT " equations\n", jac->nBlocks, nblk));
955 PetscCall(PetscInfo(pc, "\t%" PetscInt_FMT ") Add block with %" PetscInt_FMT " equations of %" PetscInt_FMT "\n", idx + 1, nblk, jac->nBlocks));