Lines Matching refs:totalslices

90   PetscInt     i, j, totalslices;  in MatSeqSELLSetPreallocation_SeqSELL()  local
127 totalslices = PetscCeilInt(B->rmap->n, b->sliceheight); in MatSeqSELLSetPreallocation_SeqSELL()
128 b->totalslices = totalslices; in MatSeqSELLSetPreallocation_SeqSELL()
133 PetscCall(PetscMalloc1(totalslices + 1, &b->sliidx)); in MatSeqSELLSetPreallocation_SeqSELL()
143 for (i = 0; i <= totalslices; i++) b->sliidx[i] = b->sliceheight * i * maxallocrow; in MatSeqSELLSetPreallocation_SeqSELL()
150 for (i = 1; i < totalslices; i++) { in MatSeqSELLSetPreallocation_SeqSELL()
163 b->sliidx[totalslices] = 0; in MatSeqSELLSetPreallocation_SeqSELL()
164 …for (j = b->sliceheight * (totalslices - 1); j < B->rmap->n; j++) b->sliidx[totalslices] = PetscMa… in MatSeqSELLSetPreallocation_SeqSELL()
168 b->sliidx[totalslices] = ((b->sliidx[totalslices] - 1) / mul + 1) * mul; in MatSeqSELLSetPreallocation_SeqSELL()
171 maxallocrow = PetscMax(b->sliidx[totalslices], maxallocrow); in MatSeqSELLSetPreallocation_SeqSELL()
172 b->sliidx[totalslices] = b->sliidx[totalslices - 1] + b->sliceheight * b->sliidx[totalslices]; in MatSeqSELLSetPreallocation_SeqSELL()
179 PetscCall(PetscMalloc2(b->sliidx[totalslices], &b->val, b->sliidx[totalslices], &b->colidx)); in MatSeqSELLSetPreallocation_SeqSELL()
181 PetscCall(PetscCalloc1(b->sliceheight * totalslices, &b->rlen)); in MatSeqSELLSetPreallocation_SeqSELL()
198 b->maxallocmat = b->sliidx[totalslices]; in MatSeqSELLSetPreallocation_SeqSELL()
326 PetscInt totalslices = a->totalslices; in MatMult_SeqSELL() local
359 for (i = 0; i < totalslices; i++) { /* loop over slices */ in MatMult_SeqSELL()
417 if (i == totalslices - 1 && A->rmap->n & 0x07) { /* if last slice has padding rows */ in MatMult_SeqSELL()
426 for (i = 0; i < totalslices; i++) { /* loop over full slices */ in MatMult_SeqSELL()
431 if (i == totalslices - 1 && (A->rmap->n & 0x07)) { in MatMult_SeqSELL()
463 for (i = 0; i < totalslices; i++) { /* loop over full slices */ in MatMult_SeqSELL()
471 if (i == totalslices - 1 && (A->rmap->n & 0x07)) { in MatMult_SeqSELL()
514 for (i = 0; i < totalslices; i++) { /* loop over slices */ in MatMult_SeqSELL()
519 if (i == totalslices - 1 && (A->rmap->n % sliceheight)) { /* if last slice has padding rows */ in MatMult_SeqSELL()
541 PetscInt totalslices = a->totalslices; in MatMultAdd_SeqSELL() local
573 for (i = 0; i < totalslices; i++) { /* loop over slices */ in MatMultAdd_SeqSELL()
577 if (i == totalslices - 1 && A->rmap->n & 0x07) { /* if last slice has padding rows */ in MatMultAdd_SeqSELL()
636 if (i == totalslices - 1 && A->rmap->n & 0x07) { /* if last slice has padding rows */ in MatMultAdd_SeqSELL()
644 for (i = 0; i < totalslices; i++) { /* loop over full slices */ in MatMultAdd_SeqSELL()
649 if (i == totalslices - 1 && (A->rmap->n & 0x07)) { in MatMultAdd_SeqSELL()
693 for (i = 0; i < totalslices; i++) { /* loop over slices */ in MatMultAdd_SeqSELL()
698 if (i == totalslices - 1 && (A->rmap->n % sliceheight)) { in MatMultAdd_SeqSELL()
720 …PetscInt i, j, r, row, nnz_in_row, totalslices = a->totalslices, sliceheight = a->sliceh… in MatMultTransposeAdd_SeqSELL() local
736 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatMultTransposeAdd_SeqSELL()
737 if (i == totalslices - 1 && (A->rmap->n % sliceheight)) { in MatMultTransposeAdd_SeqSELL()
883 PetscCall(PetscArrayzero(a->val, a->sliidx[a->totalslices])); in MatZeroEntries_SeqSELL()
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()
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()
1157 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_ASCII()
1210 for (i = 0; i < a->totalslices; i++) { /* loop over slices */ in MatView_SeqSELL_ASCII()
1367 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_Draw_Zoom()
1448 … A->rmap->n, A->cmap->n, a->maxallocmat, a->sliidx[a->totalslices], a->nz, a->sliidx[a->totalslice… in MatAssemblyEnd_SeqSELL()
1453 for (i = 0; i < a->totalslices; ++i) { in MatAssemblyEnd_SeqSELL()
1490 if (!a->chunksize && a->totalslices) { 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()
1502 while (a->sliidx[j + 1] <= i * a->chunksize && j < a->totalslices) j++; in MatAssemblyEnd_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()
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()
1668 PetscCall(PetscBLASIntCast(a->sliidx[a->totalslices], &size)); in MatScale_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()
1952 PetscCall(PetscArraycpy(a->val, a->saved_values, a->sliidx[a->totalslices])); in MatRetrieveValues_SeqSELL()
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()
1976 for (i = 0; i < a->totalslices; i++) { in MatSeqSELLGetMaxSliceWidth_SeqSELL()
1989 …if (a->totalslices) *slicewidth = (PetscReal)a->sliidx[a->totalslices] / a->sliceheight / a->total… in MatSeqSELLGetAvgSliceWidth_SeqSELL()
1997 PetscInt i, totalslices = a->totalslices, *sliidx = a->sliidx; in MatSeqSELLGetVarSliceSize_SeqSELL() local
2001 if (totalslices) { in MatSeqSELLGetVarSliceSize_SeqSELL()
2002 mean = (PetscReal)sliidx[totalslices] / totalslices; in MatSeqSELLGetVarSliceSize_SeqSELL()
2003 …i <= totalslices; i++) *variance += ((PetscReal)(sliidx[i] - sliidx[i - 1]) - mean) * ((PetscReal)… in MatSeqSELLGetVarSliceSize_SeqSELL()
2224 PetscInt totalslices = a->totalslices; in MatDuplicateNoCreate_SeqSELL() local
2238 PetscCall(PetscMalloc1(c->sliceheight * totalslices, &c->rlen)); in MatDuplicateNoCreate_SeqSELL()
2239 PetscCall(PetscMalloc1(totalslices + 1, &c->sliidx)); in MatDuplicateNoCreate_SeqSELL()
2242 for (i = 0; i < totalslices + 1; i++) c->sliidx[i] = a->sliidx[i]; in MatDuplicateNoCreate_SeqSELL()
2399 PetscInt totalslices = a->totalslices; in MatEqual_SeqSELL() local
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()
2421 for (PetscInt i = 0; i < a->sliidx[a->totalslices]; i++) val[i] = PetscConj(val[i]); in MatConjugate_SeqSELL()