Lines Matching refs:coo_n
4553 PetscErrorCode MatSetPreallocationCOO_SeqAIJ(Mat mat, PetscCount coo_n, PetscInt coo_i[], PetscInt … in MatSetPreallocationCOO_SeqAIJ() argument
4574 PetscCall(PetscMalloc1(coo_n, &perm)); in MatSetPreallocationCOO_SeqAIJ()
4579 for (k = 0; k < coo_n; k++) { in MatSetPreallocationCOO_SeqAIJ()
4589 if (!isorted) PetscCall(PetscSortIntWithIntCountArrayPair(coo_n, i, j, perm)); in MatSetPreallocationCOO_SeqAIJ()
4590 …coo_n == 0 || i[coo_n - 1] < M, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "COO row index %" Petsc… in MatSetPreallocationCOO_SeqAIJ()
4593 for (k = 0; k < coo_n; k++) in MatSetPreallocationCOO_SeqAIJ()
4596 …PetscCall(PetscMalloc1(coo_n - nneg + 1, &jmap)); /* +1 to make a CSR-like data structure. jmap[i]… in MatSetPreallocationCOO_SeqAIJ()
4602 …PetscCall(PetscShmgetAllocateArray(coo_n - nneg, sizeof(PetscInt), (void **)&Aj)); /* We have at m… in MatSetPreallocationCOO_SeqAIJ()
4609 while (k < coo_n) { in MatSetPreallocationCOO_SeqAIJ()
4618 while (k < coo_n && i[k] == row) { in MatSetPreallocationCOO_SeqAIJ()
4697 if (nnz < coo_n - nneg) { /* Reallocate with actual number of unique nonzeros */ in MatSetPreallocationCOO_SeqAIJ()
4715 PetscCall(PetscMalloc1(coo_n - nneg, &perm_new)); in MatSetPreallocationCOO_SeqAIJ()
4716 PetscCall(PetscArraycpy(perm_new, perm + nneg, coo_n - nneg)); in MatSetPreallocationCOO_SeqAIJ()
4731 coo->n = coo_n; in MatSetPreallocationCOO_SeqAIJ()
4732 coo->Atot = coo_n - nneg; // Annz is seqaij->nz, so no need to record that again in MatSetPreallocationCOO_SeqAIJ()