Lines Matching refs:a

206   Mat_SeqSELL *a = (Mat_SeqSELL *)A->data;  in MatGetRow_SeqSELL()  local
211 if (nz) *nz = a->rlen[row]; in MatGetRow_SeqSELL()
212 shift = a->sliidx[row / a->sliceheight] + (row % a->sliceheight); in MatGetRow_SeqSELL()
213 …if (!a->getrowcols) PetscCall(PetscMalloc2(a->rlenmax, &a->getrowcols, a->rlenmax, &a->getrowvals)… in MatGetRow_SeqSELL()
216 for (j = 0; j < a->rlen[row]; j++) a->getrowcols[j] = a->colidx[shift + a->sliceheight * j]; in MatGetRow_SeqSELL()
217 *idx = a->getrowcols; in MatGetRow_SeqSELL()
221 for (j = 0; j < a->rlen[row]; j++) a->getrowvals[j] = a->val[shift + a->sliceheight * j]; in MatGetRow_SeqSELL()
222 *v = a->getrowvals; in MatGetRow_SeqSELL()
236 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatConvert_SeqSELL_SeqAIJ() local
247 PetscCall(MatSeqAIJSetPreallocation(B, 0, a->rlen)); in MatConvert_SeqSELL_SeqAIJ()
276 Mat_SeqAIJ *a = (Mat_SeqAIJ *)A->data; in MatConvert_SeqAIJ_SeqSELL() local
277 PetscInt *ai = a->i, m = A->rmap->N, n = A->cmap->N, i, *rowlengths, row, ncols; in MatConvert_SeqAIJ_SeqSELL()
285 if (PetscDefined(USE_DEBUG) || !a->ilen) { in MatConvert_SeqAIJ_SeqSELL()
289 if (PetscDefined(USE_DEBUG) && a->ilen) { in MatConvert_SeqAIJ_SeqSELL()
291 PetscCall(PetscArraycmp(rowlengths, a->ilen, m, &eq)); in MatConvert_SeqAIJ_SeqSELL()
294 rowlengths = a->ilen; in MatConvert_SeqAIJ_SeqSELL()
295 } else if (a->ilen) rowlengths = a->ilen; in MatConvert_SeqAIJ_SeqSELL()
300 if (rowlengths != a->ilen) PetscCall(PetscFree(rowlengths)); in MatConvert_SeqAIJ_SeqSELL()
322 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatMult_SeqSELL() local
325 const MatScalar *aval = a->val; in MatMult_SeqSELL()
326 PetscInt totalslices = a->totalslices; in MatMult_SeqSELL()
327 const PetscInt *acolidx = a->colidx; in MatMult_SeqSELL()
346 PetscInt k, sliceheight = a->sliceheight; in MatMult_SeqSELL()
358a->sliceheight == 8, PETSC_COMM_SELF, PETSC_ERR_SUP, "The kernel requires a slice height of 8, but… in MatMult_SeqSELL()
360 PetscPrefetchBlock(acolidx, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
361 PetscPrefetchBlock(aval, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
368 j = a->sliidx[i] >> 3; /* 8 bytes are read at each time, corresponding to a slice column */ in MatMult_SeqSELL()
369 switch ((a->sliidx[i + 1] - a->sliidx[i]) / 8 & 3) { in MatMult_SeqSELL()
399 for (; j < (a->sliidx[i + 1] >> 3); j += 4) { in MatMult_SeqSELL()
425a->sliceheight == 8, PETSC_COMM_SELF, PETSC_ERR_SUP, "The kernel requires a slice height of 8, but… in MatMult_SeqSELL()
427 PetscPrefetchBlock(acolidx, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
428 PetscPrefetchBlock(aval, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
436 nnz_in_row = a->rlen[row]; in MatMult_SeqSELL()
449 for (j = a->sliidx[i]; j < a->sliidx[i + 1]; j += 8) { in MatMult_SeqSELL()
462a->sliceheight == 8, PETSC_COMM_SELF, PETSC_ERR_SUP, "The kernel requires a slice height of 8, but… in MatMult_SeqSELL()
464 PetscPrefetchBlock(acolidx, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
465 PetscPrefetchBlock(aval, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMult_SeqSELL()
476 nnz_in_row = a->rlen[row]; in MatMult_SeqSELL()
486 for (j = a->sliidx[i]; j < a->sliidx[i + 1]; j += 8) { in MatMult_SeqSELL()
517 …for (k = a->sliidx[i] + j; k < a->sliidx[i + 1]; k += sliceheight) sum[j] += aval[k] * x[acolidx[k… in MatMult_SeqSELL()
528 PetscCall(PetscLogFlops(2.0 * a->nz - a->nonzerorowcnt)); /* theoretical minimal FLOPs */ in MatMult_SeqSELL()
537 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatMultAdd_SeqSELL() local
540 const MatScalar *aval = a->val; in MatMultAdd_SeqSELL()
541 PetscInt totalslices = a->totalslices; in MatMultAdd_SeqSELL()
542 const PetscInt *acolidx = a->colidx; in MatMultAdd_SeqSELL()
556 PetscInt k, sliceheight = a->sliceheight; in MatMultAdd_SeqSELL()
565 if (!a->nz) { in MatMultAdd_SeqSELL()
572a->sliceheight == 8, PETSC_COMM_SELF, PETSC_ERR_SUP, "The kernel requires a slice height of 8, but… in MatMultAdd_SeqSELL()
574 PetscPrefetchBlock(acolidx, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMultAdd_SeqSELL()
575 PetscPrefetchBlock(aval, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMultAdd_SeqSELL()
587 j = a->sliidx[i] >> 3; /* 8 bytes are read at each time, corresponding to a slice column */ in MatMultAdd_SeqSELL()
588 switch ((a->sliidx[i + 1] - a->sliidx[i]) / 8 & 3) { in MatMultAdd_SeqSELL()
618 for (; j < (a->sliidx[i + 1] >> 3); j += 4) { in MatMultAdd_SeqSELL()
643a->sliceheight == 8, PETSC_COMM_SELF, PETSC_ERR_SUP, "The kernel requires a slice height of 8, but… in MatMultAdd_SeqSELL()
645 PetscPrefetchBlock(acolidx, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMultAdd_SeqSELL()
646 PetscPrefetchBlock(aval, a->sliidx[i + 1] - a->sliidx[i], 0, PETSC_PREFETCH_HINT_T0); in MatMultAdd_SeqSELL()
653 nnz_in_row = a->rlen[row]; in MatMultAdd_SeqSELL()
664 for (j = a->sliidx[i]; j < a->sliidx[i + 1]; j += 8) { in MatMultAdd_SeqSELL()
696 …for (k = a->sliidx[i] + j; k < a->sliidx[i + 1]; k += sliceheight) sum[j] += aval[k] * x[acolidx[k… in MatMultAdd_SeqSELL()
707 PetscCall(PetscLogFlops(2.0 * a->nz)); in MatMultAdd_SeqSELL()
715 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatMultTransposeAdd_SeqSELL() local
718 const MatScalar *aval = a->val; in MatMultTransposeAdd_SeqSELL()
719 const PetscInt *acolidx = a->colidx; in MatMultTransposeAdd_SeqSELL()
720 …PetscInt i, j, r, row, nnz_in_row, totalslices = a->totalslices, sliceheight = a->sliceh… in MatMultTransposeAdd_SeqSELL()
733 if (a->nz) { in MatMultTransposeAdd_SeqSELL()
736 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatMultTransposeAdd_SeqSELL()
740 nnz_in_row = a->rlen[row]; in MatMultTransposeAdd_SeqSELL()
746 …for (j = a->sliidx[i] + r; j < a->sliidx[i + 1]; j += sliceheight) y[acolidx[j]] += aval[j] * x[sl… in MatMultTransposeAdd_SeqSELL()
748 PetscCall(PetscLogFlops(2.0 * a->nz)); in MatMultTransposeAdd_SeqSELL()
769 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatGetDiagonalMarkers_SeqSELL() local
775 *diag = a->diag; in MatGetDiagonalMarkers_SeqSELL()
779 if (a->diagNonzeroState != A->nonzerostate || (diag && !a->diag)) { in MatGetDiagonalMarkers_SeqSELL()
783 if (!diag && !a->diag) { in MatGetDiagonalMarkers_SeqSELL()
784 a->diagDense = PETSC_TRUE; in MatGetDiagonalMarkers_SeqSELL()
788 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonalMarkers_SeqSELL()
789 for (PetscInt j = 0; j < a->rlen[i]; j++) { in MatGetDiagonalMarkers_SeqSELL()
790 if (a->colidx[shift + a->sliceheight * j] == i) { in MatGetDiagonalMarkers_SeqSELL()
791 a->diag[i] = shift + a->sliceheight * j; in MatGetDiagonalMarkers_SeqSELL()
797 a->diagDense = PETSC_FALSE; in MatGetDiagonalMarkers_SeqSELL()
798 *diagDense = a->diagDense; in MatGetDiagonalMarkers_SeqSELL()
799 a->diagNonzeroState = A->nonzerostate; in MatGetDiagonalMarkers_SeqSELL()
804 if (!a->diag) PetscCall(PetscMalloc1(m, &a->diag)); in MatGetDiagonalMarkers_SeqSELL()
805 a->diagDense = PETSC_TRUE; in MatGetDiagonalMarkers_SeqSELL()
809 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonalMarkers_SeqSELL()
810 a->diag[i] = -1; in MatGetDiagonalMarkers_SeqSELL()
811 for (PetscInt j = 0; j < a->rlen[i]; j++) { in MatGetDiagonalMarkers_SeqSELL()
812 if (a->colidx[shift + a->sliceheight * j] == i) { in MatGetDiagonalMarkers_SeqSELL()
813 a->diag[i] = shift + a->sliceheight * j; in MatGetDiagonalMarkers_SeqSELL()
818 if (!found) a->diagDense = PETSC_FALSE; in MatGetDiagonalMarkers_SeqSELL()
821 a->diagNonzeroState = A->nonzerostate; in MatGetDiagonalMarkers_SeqSELL()
823 if (diag) *diag = a->diag; in MatGetDiagonalMarkers_SeqSELL()
824 if (diagDense) *diagDense = a->diagDense; in MatGetDiagonalMarkers_SeqSELL()
833 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatInvertDiagonalForSOR_SeqSELL() local
835 MatScalar *val = a->val; in MatInvertDiagonalForSOR_SeqSELL()
841 …if (a->idiagState == ((PetscObject)A)->state && a->omega == omega && a->fshift == fshift) PetscFun… in MatInvertDiagonalForSOR_SeqSELL()
845 if (!a->idiag) { in MatInvertDiagonalForSOR_SeqSELL()
846 PetscCall(PetscMalloc3(m, &a->idiag, m, &a->mdiag, m, &a->ssor_work)); in MatInvertDiagonalForSOR_SeqSELL()
847 val = a->val; in MatInvertDiagonalForSOR_SeqSELL()
849 mdiag = a->mdiag; in MatInvertDiagonalForSOR_SeqSELL()
850 idiag = a->idiag; in MatInvertDiagonalForSOR_SeqSELL()
872 a->idiagState = ((PetscObject)A)->state; in MatInvertDiagonalForSOR_SeqSELL()
873 a->omega = omega; in MatInvertDiagonalForSOR_SeqSELL()
874 a->fshift = fshift; in MatInvertDiagonalForSOR_SeqSELL()
880 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatZeroEntries_SeqSELL() local
883 PetscCall(PetscArrayzero(a->val, a->sliidx[a->totalslices])); in MatZeroEntries_SeqSELL()
889 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatDestroy_SeqSELL() local
892 …ows=%" PetscInt_FMT ", Cols=%" PetscInt_FMT ", NZ=%" PetscInt_FMT, A->rmap->n, A->cmap->n, a->nz)); in MatDestroy_SeqSELL()
893 PetscCall(MatSeqXSELLFreeSELL(A, &a->val, &a->colidx)); in MatDestroy_SeqSELL()
894 PetscCall(ISDestroy(&a->row)); in MatDestroy_SeqSELL()
895 PetscCall(ISDestroy(&a->col)); in MatDestroy_SeqSELL()
896 PetscCall(PetscFree(a->diag)); in MatDestroy_SeqSELL()
897 PetscCall(PetscFree(a->rlen)); in MatDestroy_SeqSELL()
898 PetscCall(PetscFree(a->sliidx)); in MatDestroy_SeqSELL()
899 PetscCall(PetscFree3(a->idiag, a->mdiag, a->ssor_work)); in MatDestroy_SeqSELL()
900 PetscCall(PetscFree(a->solve_work)); in MatDestroy_SeqSELL()
901 PetscCall(ISDestroy(&a->icol)); in MatDestroy_SeqSELL()
902 PetscCall(PetscFree(a->saved_values)); in MatDestroy_SeqSELL()
903 PetscCall(PetscFree2(a->getrowcols, a->getrowvals)); in MatDestroy_SeqSELL()
906 PetscCall(PetscFree(a->chunk_slice_map)); in MatDestroy_SeqSELL()
932 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatSetOption_SeqSELL() local
937 a->roworiented = flg; in MatSetOption_SeqSELL()
940 a->keepnonzeropattern = flg; in MatSetOption_SeqSELL()
943 a->nonew = (flg ? 0 : 1); in MatSetOption_SeqSELL()
946 a->nonew = (flg ? -1 : 0); in MatSetOption_SeqSELL()
949 a->nonew = (flg ? -2 : 0); in MatSetOption_SeqSELL()
952 a->nounused = (flg ? -1 : 0); in MatSetOption_SeqSELL()
962 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatGetDiagonal_SeqSELL() local
975 for (i = 0; i < n; i++) x[i] = 1.0 / a->val[diag[i]]; in MatGetDiagonal_SeqSELL()
983 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonal_SeqSELL()
985 for (j = 0; j < a->rlen[i]; j++) { in MatGetDiagonal_SeqSELL()
986 if (a->colidx[shift + a->sliceheight * j] == i) { in MatGetDiagonal_SeqSELL()
987 x[i] = a->val[shift + a->sliceheight * j]; in MatGetDiagonal_SeqSELL()
998 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatDiagonalScale_SeqSELL() local
1009 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatDiagonalScale_SeqSELL()
1010 …if (i == a->totalslices - 1 && (A->rmap->n % a->sliceheight)) { /* if last slice has padding rows … in MatDiagonalScale_SeqSELL()
1011 … for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = (row + 1) % a->sliceheight) { in MatDiagonalScale_SeqSELL()
1012 if (row < (A->rmap->n % a->sliceheight)) a->val[j] *= l[a->sliceheight * i + row]; in MatDiagonalScale_SeqSELL()
1015 …for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = (row + 1) % a->sliceheight) a->va… in MatDiagonalScale_SeqSELL()
1019 PetscCall(PetscLogFlops(a->nz)); in MatDiagonalScale_SeqSELL()
1025 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatDiagonalScale_SeqSELL()
1026 …if (i == a->totalslices - 1 && (A->rmap->n % a->sliceheight)) { /* if last slice has padding rows … in MatDiagonalScale_SeqSELL()
1027 … for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = ((row + 1) % a->sliceheight)) { in MatDiagonalScale_SeqSELL()
1028 if (row < (A->rmap->n % a->sliceheight)) a->val[j] *= r[a->colidx[j]]; in MatDiagonalScale_SeqSELL()
1031 for (j = a->sliidx[i]; j < a->sliidx[i + 1]; j++) a->val[j] *= r[a->colidx[j]]; in MatDiagonalScale_SeqSELL()
1035 PetscCall(PetscLogFlops(a->nz)); in MatDiagonalScale_SeqSELL()
1045 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatGetValues_SeqSELL() local
1055 … shift = a->sliidx[row / a->sliceheight] + (row % a->sliceheight); /* starting index of the row */ in MatGetValues_SeqSELL()
1056 cp = a->colidx + shift; /* pointer to the row */ in MatGetValues_SeqSELL()
1057 vp = a->val + shift; /* pointer to the row */ in MatGetValues_SeqSELL()
1062 high = a->rlen[row]; in MatGetValues_SeqSELL()
1066 if (*(cp + a->sliceheight * t) > col) high = t; in MatGetValues_SeqSELL()
1070 if (*(cp + a->sliceheight * i) > col) break; in MatGetValues_SeqSELL()
1071 if (*(cp + a->sliceheight * i) == col) { in MatGetValues_SeqSELL()
1072 *v++ = *(vp + a->sliceheight * i); in MatGetValues_SeqSELL()
1085 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatView_SeqSELL_ASCII() local
1099 PetscCall(PetscViewerASCIIPrintf(viewer, "%% Nonzeros = %" PetscInt_FMT " \n", a->nz)); in MatView_SeqSELL_ASCII()
1101 …PetscCall(PetscViewerASCIIPrintf(viewer, "zzz = zeros(%" PetscInt_FMT ",4);\n", a->nz + nofinalval… in MatView_SeqSELL_ASCII()
1103 …PetscCall(PetscViewerASCIIPrintf(viewer, "zzz = zeros(%" PetscInt_FMT ",3);\n", a->nz + nofinalval… in MatView_SeqSELL_ASCII()
1108 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1109 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_ASCII()
1111 … 1, a->colidx[shift + a->sliceheight * j] + 1, (double)PetscRealPart(a->val[shift + a->sliceheight… in MatView_SeqSELL_ASCII()
1113 …MT " %" PetscInt_FMT " %18.16e\n", i + 1, a->colidx[shift + a->sliceheight * j] + 1, (double)a->v… in MatView_SeqSELL_ASCII()
1135 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1136 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_ASCII()
1138 …if (PetscImaginaryPart(a->val[shift + a->sliceheight * j]) > 0.0 && PetscRealPart(a->val[shift + a in MatView_SeqSELL_ASCII()
1139 … i)", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart(a->val[shift + a->sliceheight *… in MatView_SeqSELL_ASCII()
1140 …} else if (PetscImaginaryPart(a->val[shift + a->sliceheight * j]) < 0.0 && PetscRealPart(a->val[sh… in MatView_SeqSELL_ASCII()
1141 …i)", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart(a->val[shift + a->sliceheight * … in MatView_SeqSELL_ASCII()
1142 } else if (PetscRealPart(a->val[shift + a->sliceheight * j]) != 0.0) { in MatView_SeqSELL_ASCII()
1143 …(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart… in MatView_SeqSELL_ASCII()
1146a->val[shift + a->sliceheight * j] != 0.0) PetscCall(PetscViewerASCIIPrintf(viewer, " (%" PetscInt… in MatView_SeqSELL_ASCII()
1157 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_ASCII()
1158 if (PetscImaginaryPart(a->val[i]) != 0.0) { in MatView_SeqSELL_ASCII()
1168 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1170 if (jcnt < a->rlen[i] && j == a->colidx[shift + a->sliceheight * j]) { in MatView_SeqSELL_ASCII()
1171 value = a->val[cnt++]; in MatView_SeqSELL_ASCII()
1197 …IIPrintf(viewer, "%" PetscInt_FMT " %" PetscInt_FMT " %" PetscInt_FMT "\n", m, A->cmap->n, a->nz)); in MatView_SeqSELL_ASCII()
1199 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1200 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_ASCII()
1202a->colidx[shift + a->sliceheight * j] + fshift, (double)PetscRealPart(a->val[shift + a->sliceheig… in MatView_SeqSELL_ASCII()
1204 … " %" PetscInt_FMT " %g\n", i + fshift, a->colidx[shift + a->sliceheight * j] + fshift, (double)a-… in MatView_SeqSELL_ASCII()
1210 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatView_SeqSELL_ASCII()
1212 …"slice %" PetscInt_FMT ": %" PetscInt_FMT " %" PetscInt_FMT "\n", i, a->sliidx[i], a->sliidx[i + 1… in MatView_SeqSELL_ASCII()
1213 for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = (row + 1) % a->sliceheight) { in MatView_SeqSELL_ASCII()
1215 if (PetscImaginaryPart(a->val[j]) > 0.0) { in MatView_SeqSELL_ASCII()
1216 …cInt_FMT " %g + %g i\n", a->sliceheight * i + row, a->colidx[j], (double)PetscRealPart(a->val[j]),… in MatView_SeqSELL_ASCII()
1217 } else if (PetscImaginaryPart(a->val[j]) < 0.0) { in MatView_SeqSELL_ASCII()
1218 …cInt_FMT " %g - %g i\n", a->sliceheight * i + row, a->colidx[j], (double)PetscRealPart(a->val[j]),… in MatView_SeqSELL_ASCII()
1220 … %" PetscInt_FMT " %" PetscInt_FMT " %g\n", a->sliceheight * i + row, a->colidx[j], (double)Petsc… in MatView_SeqSELL_ASCII()
1223 …ewer, " %" PetscInt_FMT " %" PetscInt_FMT " %g\n", a->sliceheight * i + row, a->colidx[j], (doubl… in MatView_SeqSELL_ASCII()
1231 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1234 for (j = shift; j < a->diag[i]; j += a->sliceheight) { in MatView_SeqSELL_ASCII()
1236 if (PetscImaginaryPart(a->val[shift + a->sliceheight * j]) > 0.0) { in MatView_SeqSELL_ASCII()
1237 …r, " (%" PetscInt_FMT ", %g + %g i)", a->colidx[j], (double)PetscRealPart(a->val[j]), (double)Pets… in MatView_SeqSELL_ASCII()
1238 } else if (PetscImaginaryPart(a->val[shift + a->sliceheight * j]) < 0.0) { in MatView_SeqSELL_ASCII()
1239 …, " (%" PetscInt_FMT ", %g - %g i)", a->colidx[j], (double)PetscRealPart(a->val[j]), (double)(-Pet… in MatView_SeqSELL_ASCII()
1241 …tscViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)PetscRealPart(a->v… in MatView_SeqSELL_ASCII()
1244 …Call(PetscViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)a->val[j])); in MatView_SeqSELL_ASCII()
1248 j = a->diag[i]; in MatView_SeqSELL_ASCII()
1250 if (PetscImaginaryPart(a->val[j]) > 0.0) { in MatView_SeqSELL_ASCII()
1251 …%" PetscInt_FMT ", %g + %g i)", a->colidx[j], (double)PetscRealPart(1.0 / a->val[j]), (double)Pets… in MatView_SeqSELL_ASCII()
1252 } else if (PetscImaginaryPart(a->val[j]) < 0.0) { in MatView_SeqSELL_ASCII()
1253 …" PetscInt_FMT ", %g - %g i)", a->colidx[j], (double)PetscRealPart(1.0 / a->val[j]), (double)(-Pet… in MatView_SeqSELL_ASCII()
1255 …ViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)PetscRealPart(1.0 / a in MatView_SeqSELL_ASCII()
1258 …l(PetscViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)(1 / a->val[j]… in MatView_SeqSELL_ASCII()
1262 for (j = a->diag[i] + 1; j < shift + a->sliceheight * a->rlen[i]; j += a->sliceheight) { in MatView_SeqSELL_ASCII()
1264 if (PetscImaginaryPart(a->val[j]) > 0.0) { in MatView_SeqSELL_ASCII()
1265 …r, " (%" PetscInt_FMT ", %g + %g i)", a->colidx[j], (double)PetscRealPart(a->val[j]), (double)Pets… in MatView_SeqSELL_ASCII()
1266 } else if (PetscImaginaryPart(a->val[j]) < 0.0) { in MatView_SeqSELL_ASCII()
1267 …, " (%" PetscInt_FMT ", %g - %g i)", a->colidx[j], (double)PetscRealPart(a->val[j]), (double)(-Pet… in MatView_SeqSELL_ASCII()
1269 …tscViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)PetscRealPart(a->v… in MatView_SeqSELL_ASCII()
1272 …Call(PetscViewerASCIIPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[j], (double)a->val[j])); in MatView_SeqSELL_ASCII()
1279 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1281 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_ASCII()
1283 if (PetscImaginaryPart(a->val[j]) > 0.0) { in MatView_SeqSELL_ASCII()
1284 … i)", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart(a->val[shift + a->sliceheight *… in MatView_SeqSELL_ASCII()
1285 } else if (PetscImaginaryPart(a->val[j]) < 0.0) { in MatView_SeqSELL_ASCII()
1286 …i)", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart(a->val[shift + a->sliceheight * … in MatView_SeqSELL_ASCII()
1288 …(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[shift + a->sliceheight * j], (double)PetscRealPart… in MatView_SeqSELL_ASCII()
1291 …IPrintf(viewer, " (%" PetscInt_FMT ", %g) ", a->colidx[shift + a->sliceheight * j], (double)a->val… in MatView_SeqSELL_ASCII()
1307 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatView_SeqSELL_Draw_Zoom() local
1326 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatView_SeqSELL_Draw_Zoom()
1329 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_Draw_Zoom()
1330 x_l = a->colidx[shift + a->sliceheight * j]; in MatView_SeqSELL_Draw_Zoom()
1332 if (PetscRealPart(a->val[shift + a->sliceheight * j]) >= 0.) continue; in MatView_SeqSELL_Draw_Zoom()
1338 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1341 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_Draw_Zoom()
1342 x_l = a->colidx[shift + a->sliceheight * j]; in MatView_SeqSELL_Draw_Zoom()
1344 if (a->val[shift + a->sliceheight * j] != 0.) continue; in MatView_SeqSELL_Draw_Zoom()
1350 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1353 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_Draw_Zoom()
1354 x_l = a->colidx[shift + a->sliceheight * j]; in MatView_SeqSELL_Draw_Zoom()
1356 if (PetscRealPart(a->val[shift + a->sliceheight * j]) <= 0.) continue; in MatView_SeqSELL_Draw_Zoom()
1367 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_Draw_Zoom()
1368 if (PetscAbsScalar(a->val[i]) > maxv) maxv = PetscAbsScalar(a->val[i]); in MatView_SeqSELL_Draw_Zoom()
1376 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1379 for (j = 0; j < a->rlen[i]; j++) { in MatView_SeqSELL_Draw_Zoom()
1380 x_l = a->colidx[shift + a->sliceheight * j]; in MatView_SeqSELL_Draw_Zoom()
1382 color = PetscDrawRealToColor(PetscAbsScalar(a->val[count]), minv, maxv); in MatView_SeqSELL_Draw_Zoom()
1438 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatAssemblyEnd_SeqSELL() local
1448 …edzeros)\n", A->rmap->n, A->cmap->n, a->maxallocmat, a->sliidx[a->totalslices], a->nz, a->sliidx[a in MatAssemblyEnd_SeqSELL()
1449 …PetscCall(PetscInfo(A, "Number of mallocs during MatSetValues() is %" PetscInt_FMT "\n", a->reallo… in MatAssemblyEnd_SeqSELL()
1450 PetscCall(PetscInfo(A, "Maximum nonzeros in any row is %" PetscInt_FMT "\n", a->rlenmax)); in MatAssemblyEnd_SeqSELL()
1451 a->nonzerorowcnt = 0; in MatAssemblyEnd_SeqSELL()
1453 for (i = 0; i < a->totalslices; ++i) { in MatAssemblyEnd_SeqSELL()
1454 …shift = a->sliidx[i]; /* starting index of the s… in MatAssemblyEnd_SeqSELL()
1455 …cp = PetscSafePointerPlusOffset(a->colidx, shift); /* pointer to the column i… in MatAssemblyEnd_SeqSELL()
1456 …vp = PetscSafePointerPlusOffset(a->val, shift); /* pointer to the nonzero … in MatAssemblyEnd_SeqSELL()
1457 …for (row_in_slice = 0; row_in_slice < a->sliceheight; ++row_in_slice) { /* loop over rows in the s… in MatAssemblyEnd_SeqSELL()
1458 row = a->sliceheight * i + row_in_slice; in MatAssemblyEnd_SeqSELL()
1459 nrow = a->rlen[row]; /* number of nonzeros in row */ in MatAssemblyEnd_SeqSELL()
1466 a->nonzerorowcnt++; in MatAssemblyEnd_SeqSELL()
1467 …lastcol = cp[a->sliceheight * (nrow - 1) + row_in_slice]; /* use the index from the last nonzero a… in MatAssemblyEnd_SeqSELL()
1469 for (j = 1; j < a->sliceheight; j++) { in MatAssemblyEnd_SeqSELL()
1470 if (a->rlen[a->sliceheight * i + j]) { in MatAssemblyEnd_SeqSELL()
1476 …if (a->sliidx[i + 1] != shift) lastcol = cp[row_in_slice - 1]; /* use the index from the previous … in MatAssemblyEnd_SeqSELL()
1479 for (k = nrow; k < (a->sliidx[i + 1] - shift) / a->sliceheight; ++k) { in MatAssemblyEnd_SeqSELL()
1480 cp[a->sliceheight * k + row_in_slice] = lastcol; in MatAssemblyEnd_SeqSELL()
1481 vp[a->sliceheight * k + row_in_slice] = (MatScalar)0; in MatAssemblyEnd_SeqSELL()
1486 A->info.mallocs += a->reallocs; in MatAssemblyEnd_SeqSELL()
1487 a->reallocs = 0; in MatAssemblyEnd_SeqSELL()
1490 if (!a->chunksize && a->totalslices) { in MatAssemblyEnd_SeqSELL()
1491 a->chunksize = 64; in MatAssemblyEnd_SeqSELL()
1492 …while (a->chunksize < 1024 && 2 * a->chunksize <= a->sliidx[a->totalslices] / a->totalslices) a->c… in MatAssemblyEnd_SeqSELL()
1493 totalchunks = 1 + (a->sliidx[a->totalslices] - 1) / a->chunksize; in MatAssemblyEnd_SeqSELL()
1495 if (totalchunks != a->totalchunks) { in MatAssemblyEnd_SeqSELL()
1496 PetscCall(PetscFree(a->chunk_slice_map)); in MatAssemblyEnd_SeqSELL()
1497 PetscCall(PetscMalloc1(totalchunks, &a->chunk_slice_map)); in MatAssemblyEnd_SeqSELL()
1498 a->totalchunks = totalchunks; in MatAssemblyEnd_SeqSELL()
1502 while (a->sliidx[j + 1] <= i * a->chunksize && j < a->totalslices) j++; in MatAssemblyEnd_SeqSELL()
1503 a->chunk_slice_map[i] = j; in MatAssemblyEnd_SeqSELL()
1511 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatGetInfo_SeqSELL() local
1515 info->nz_allocated = a->maxallocmat; in MatGetInfo_SeqSELL()
1516 info->nz_used = a->sliidx[a->totalslices]; /* include padding zeros */ in MatGetInfo_SeqSELL()
1517 info->nz_unneeded = (a->maxallocmat - a->sliidx[a->totalslices]); in MatGetInfo_SeqSELL()
1535 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatSetValues_SeqSELL() local
1537 PetscInt *cp, nonew = a->nonew, lastcol = -1; in MatSetValues_SeqSELL()
1541 PetscInt mul = DEVICE_MEM_ALIGN / a->sliceheight; in MatSetValues_SeqSELL()
1549 shift = a->sliidx[row / a->sliceheight] + row % a->sliceheight; /* starting index of the row */ in MatSetValues_SeqSELL()
1550 cp = a->colidx + shift; /* pointer to the row */ in MatSetValues_SeqSELL()
1551 vp = a->val + shift; /* pointer to the row */ in MatSetValues_SeqSELL()
1552 nrow = a->rlen[row]; in MatSetValues_SeqSELL()
1560 if (a->roworiented) { in MatSetValues_SeqSELL()
1565 if ((value == 0.0 && a->ignorezeroentries) && (is == ADD_VALUES)) continue; in MatSetValues_SeqSELL()
1573 if (*(cp + a->sliceheight * t) > col) high = t; in MatSetValues_SeqSELL()
1577 if (*(cp + a->sliceheight * i) > col) break; in MatSetValues_SeqSELL()
1578 if (*(cp + a->sliceheight * i) == col) { in MatSetValues_SeqSELL()
1579 if (is == ADD_VALUES) *(vp + a->sliceheight * i) += value; in MatSetValues_SeqSELL()
1580 else *(vp + a->sliceheight * i) = value; in MatSetValues_SeqSELL()
1588 if (value == 0.0 && a->ignorezeroentries) goto noinsert; in MatSetValues_SeqSELL()
1592 …LLReallocateSELL(A, A->rmap->n, 1, nrow, a->sliidx, a->sliceheight, row / a->sliceheight, row, col… in MatSetValues_SeqSELL()
1595 …LLReallocateSELL(A, A->rmap->n, 1, nrow, a->sliidx, a->sliceheight, row / a->sliceheight, row, col… in MatSetValues_SeqSELL()
1599 *(cp + a->sliceheight * (ii + 1)) = *(cp + a->sliceheight * ii); in MatSetValues_SeqSELL()
1600 *(vp + a->sliceheight * (ii + 1)) = *(vp + a->sliceheight * ii); in MatSetValues_SeqSELL()
1602 a->rlen[row]++; in MatSetValues_SeqSELL()
1603 *(cp + a->sliceheight * i) = col; in MatSetValues_SeqSELL()
1604 *(vp + a->sliceheight * i) = value; in MatSetValues_SeqSELL()
1605 a->nz++; in MatSetValues_SeqSELL()
1614 a->rlen[row] = nrow; in MatSetValues_SeqSELL()
1627 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatCopy_SeqSELL() local
1630 …PetscCheck(a->sliidx[a->totalslices] == b->sliidx[b->totalslices], PETSC_COMM_SELF, PETSC_ERR_ARG_… in MatCopy_SeqSELL()
1631 PetscCall(PetscArraycpy(b->val, a->val, a->sliidx[a->totalslices])); in MatCopy_SeqSELL()
1647 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatSeqSELLGetArray_SeqSELL() local
1650 *array = a->val; in MatSeqSELLGetArray_SeqSELL()
1662 Mat_SeqSELL *a = (Mat_SeqSELL *)inA->data; in MatScale_SeqSELL() local
1663 MatScalar *aval = a->val; in MatScale_SeqSELL()
1668 PetscCall(PetscBLASIntCast(a->sliidx[a->totalslices], &size)); in MatScale_SeqSELL()
1670 PetscCall(PetscLogFlops(a->nz)); in MatScale_SeqSELL()
1677 PetscErrorCode MatShift_SeqSELL(Mat Y, PetscScalar a) in MatShift_SeqSELL() argument
1683 PetscCall(MatShift_Basic(Y, a)); in MatShift_SeqSELL()
1689 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatSOR_SeqSELL() local
1700 diag = a->diag; in MatSOR_SeqSELL()
1701 t = a->ssor_work; in MatSOR_SeqSELL()
1702 idiag = a->idiag; in MatSOR_SeqSELL()
1703 mdiag = a->mdiag; in MatSOR_SeqSELL()
1715 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1717 n = (diag[i] - shift) / a->sliceheight; in MatSOR_SeqSELL()
1718 …for (j = 0; j < n; j++) sum -= a->val[shift + a->sliceheight * j] * x[a->colidx[shift + a->slicehe… in MatSOR_SeqSELL()
1723 PetscCall(PetscLogFlops(a->nz)); in MatSOR_SeqSELL()
1727 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1729 n = a->rlen[i] - (diag[i] - shift) / a->sliceheight - 1; in MatSOR_SeqSELL()
1730 …for (j = 1; j <= n; j++) sum -= a->val[diag[i] + a->sliceheight * j] * x[a->colidx[diag[i] + a->sl… in MatSOR_SeqSELL()
1737 PetscCall(PetscLogFlops(a->nz)); /* assumes 1/2 in upper */ in MatSOR_SeqSELL()
1745 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1747 n = (diag[i] - shift) / a->sliceheight; in MatSOR_SeqSELL()
1748 …for (j = 0; j < n; j++) sum -= a->val[shift + a->sliceheight * j] * x[a->colidx[shift + a->slicehe… in MatSOR_SeqSELL()
1751 n = a->rlen[i] - (diag[i] - shift) / a->sliceheight - 1; in MatSOR_SeqSELL()
1752 …for (j = 1; j <= n; j++) sum -= a->val[diag[i] + a->sliceheight * j] * x[a->colidx[diag[i] + a->sl… in MatSOR_SeqSELL()
1756 PetscCall(PetscLogFlops(2.0 * a->nz)); in MatSOR_SeqSELL()
1760 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1764 n = a->rlen[i]; in MatSOR_SeqSELL()
1765 …for (j = 0; j < n; j++) sum -= a->val[shift + a->sliceheight * j] * x[a->colidx[shift + a->slicehe… in MatSOR_SeqSELL()
1768 n = a->rlen[i] - (diag[i] - shift) / a->sliceheight - 1; in MatSOR_SeqSELL()
1769 …for (j = 1; j <= n; j++) sum -= a->val[diag[i] + a->sliceheight * j] * x[a->colidx[diag[i] + a->sl… in MatSOR_SeqSELL()
1774 PetscCall(PetscLogFlops(2.0 * a->nz)); in MatSOR_SeqSELL()
1776 PetscCall(PetscLogFlops(a->nz)); /* assumes 1/2 in upper */ in MatSOR_SeqSELL()
1932 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatStoreValues_SeqSELL() local
1935 …PetscCheck(a->nonew, PETSC_COMM_SELF, PETSC_ERR_ORDER, "Must call MatSetOption(A,MAT_NEW_NONZERO_L… in MatStoreValues_SeqSELL()
1938 if (!a->saved_values) PetscCall(PetscMalloc1(a->sliidx[a->totalslices] + 1, &a->saved_values)); in MatStoreValues_SeqSELL()
1941 PetscCall(PetscArraycpy(a->saved_values, a->val, a->sliidx[a->totalslices])); in MatStoreValues_SeqSELL()
1947 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatRetrieveValues_SeqSELL() local
1950 …PetscCheck(a->nonew, PETSC_COMM_SELF, PETSC_ERR_ORDER, "Must call MatSetOption(A,MAT_NEW_NONZERO_L… in MatRetrieveValues_SeqSELL()
1951 …PetscCheck(a->saved_values, PETSC_COMM_SELF, PETSC_ERR_ORDER, "Must call MatStoreValues(A);first"); in MatRetrieveValues_SeqSELL()
1952 PetscCall(PetscArraycpy(a->val, a->saved_values, a->sliidx[a->totalslices])); in MatRetrieveValues_SeqSELL()
1958 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatSeqSELLGetFillRatio_SeqSELL() local
1961 if (a->totalslices && a->sliidx[a->totalslices]) { in MatSeqSELLGetFillRatio_SeqSELL()
1962 *ratio = (PetscReal)(a->sliidx[a->totalslices] - a->nz) / a->sliidx[a->totalslices]; in MatSeqSELLGetFillRatio_SeqSELL()
1971 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatSeqSELLGetMaxSliceWidth_SeqSELL() local
1976 for (i = 0; i < a->totalslices; i++) { in MatSeqSELLGetMaxSliceWidth_SeqSELL()
1977 current_slicewidth = (a->sliidx[i + 1] - a->sliidx[i]) / a->sliceheight; in MatSeqSELLGetMaxSliceWidth_SeqSELL()
1985 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatSeqSELLGetAvgSliceWidth_SeqSELL() local
1989 …if (a->totalslices) *slicewidth = (PetscReal)a->sliidx[a->totalslices] / a->sliceheight / a->total… in MatSeqSELLGetAvgSliceWidth_SeqSELL()
1995 Mat_SeqSELL *a = (Mat_SeqSELL *)mat->data; in MatSeqSELLGetVarSliceSize_SeqSELL() local
1997 PetscInt i, totalslices = a->totalslices, *sliidx = a->sliidx; in MatSeqSELLGetVarSliceSize_SeqSELL()
2010 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatSeqSELLSetSliceHeight_SeqSELL() local
2014a->sliceheight <= 0 || a->sliceheight == sliceheight, PETSC_COMM_SELF, PETSC_ERR_SUP, "Cannot chan… in MatSeqSELLSetSliceHeight_SeqSELL()
2015 a->sliceheight = sliceheight; in MatSeqSELLSetSliceHeight_SeqSELL()
2222 Mat_SeqSELL *c = (Mat_SeqSELL *)C->data, *a = (Mat_SeqSELL *)A->data; in MatDuplicateNoCreate_SeqSELL() local
2224 PetscInt totalslices = a->totalslices; in MatDuplicateNoCreate_SeqSELL()
2237 c->sliceheight = a->sliceheight; in MatDuplicateNoCreate_SeqSELL()
2241 for (i = 0; i < m; i++) c->rlen[i] = a->rlen[i]; in MatDuplicateNoCreate_SeqSELL()
2242 for (i = 0; i < totalslices + 1; i++) c->sliidx[i] = a->sliidx[i]; in MatDuplicateNoCreate_SeqSELL()
2246 PetscCall(PetscMalloc2(a->maxallocmat, &c->val, a->maxallocmat, &c->colidx)); in MatDuplicateNoCreate_SeqSELL()
2251 PetscCall(PetscArraycpy(c->colidx, a->colidx, a->maxallocmat)); in MatDuplicateNoCreate_SeqSELL()
2253 PetscCall(PetscArraycpy(c->val, a->val, a->maxallocmat)); in MatDuplicateNoCreate_SeqSELL()
2255 PetscCall(PetscArrayzero(c->val, a->maxallocmat)); in MatDuplicateNoCreate_SeqSELL()
2260 c->ignorezeroentries = a->ignorezeroentries; in MatDuplicateNoCreate_SeqSELL()
2261 c->roworiented = a->roworiented; in MatDuplicateNoCreate_SeqSELL()
2262 c->nonew = a->nonew; in MatDuplicateNoCreate_SeqSELL()
2267 c->keepnonzeropattern = a->keepnonzeropattern; in MatDuplicateNoCreate_SeqSELL()
2271 c->maxallocmat = a->maxallocmat; in MatDuplicateNoCreate_SeqSELL()
2272 c->maxallocrow = a->maxallocrow; in MatDuplicateNoCreate_SeqSELL()
2273 c->rlenmax = a->rlenmax; in MatDuplicateNoCreate_SeqSELL()
2274 c->nz = a->nz; in MatDuplicateNoCreate_SeqSELL()
2277 c->nonzerorowcnt = a->nonzerorowcnt; in MatDuplicateNoCreate_SeqSELL()
2398 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data, *b = (Mat_SeqSELL *)B->data; in MatEqual_SeqSELL() local
2399 PetscInt totalslices = a->totalslices; in MatEqual_SeqSELL()
2403 …if ((A->rmap->n != B->rmap->n) || (A->cmap->n != B->cmap->n) || (a->nz != b->nz) || (a->rlenmax !=… in MatEqual_SeqSELL()
2408 PetscCall(PetscArraycmp(a->colidx, b->colidx, a->sliidx[totalslices], flg)); in MatEqual_SeqSELL()
2411 PetscCall(PetscArraycmp(a->val, b->val, a->sliidx[totalslices], flg)); in MatEqual_SeqSELL()
2417 Mat_SeqSELL *a = (Mat_SeqSELL *)A->data; in MatConjugate_SeqSELL() local
2418 PetscScalar *val = a->val; in MatConjugate_SeqSELL()
2421 for (PetscInt i = 0; i < a->sliidx[a->totalslices]; i++) val[i] = PetscConj(val[i]); in MatConjugate_SeqSELL()