Lines Matching refs:sliidx
132 …if (!b->sliidx) { /* sliidx gives the starting index of each slice, the last element is the total … 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()
149 b->sliidx[0] = 0; in MatSeqSELLSetPreallocation_SeqSELL()
151 b->sliidx[i] = 0; in MatSeqSELLSetPreallocation_SeqSELL()
152 …for (j = 0; j < b->sliceheight; j++) b->sliidx[i] = PetscMax(b->sliidx[i], rlen[b->sliceheight * (… in MatSeqSELLSetPreallocation_SeqSELL()
155 rlenmax = PetscMax(b->sliidx[i], rlenmax); in MatSeqSELLSetPreallocation_SeqSELL()
156 b->sliidx[i] = ((b->sliidx[i] - 1) / mul + 1) * mul; in MatSeqSELLSetPreallocation_SeqSELL()
159 maxallocrow = PetscMax(b->sliidx[i], maxallocrow); in MatSeqSELLSetPreallocation_SeqSELL()
160 PetscCall(PetscIntSumError(b->sliidx[i - 1], b->sliceheight * b->sliidx[i], &b->sliidx[i])); in MatSeqSELLSetPreallocation_SeqSELL()
163 b->sliidx[totalslices] = 0; in MatSeqSELLSetPreallocation_SeqSELL()
164 …liceheight * (totalslices - 1); j < B->rmap->n; j++) b->sliidx[totalslices] = PetscMax(b->sliidx[t… in MatSeqSELLSetPreallocation_SeqSELL()
167 rlenmax = PetscMax(b->sliidx[i], rlenmax); 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()
198 b->maxallocmat = b->sliidx[totalslices]; in MatSeqSELLSetPreallocation_SeqSELL()
212 shift = a->sliidx[row / a->sliceheight] + (row % a->sliceheight); in MatGetRow_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()
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()
449 for (j = a->sliidx[i]; j < a->sliidx[i + 1]; j += 8) { 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()
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()
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()
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()
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()
746 …for (j = a->sliidx[i] + r; j < a->sliidx[i + 1]; j += sliceheight) y[acolidx[j]] += aval[j] * x[sl… in MatMultTransposeAdd_SeqSELL()
788 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonalMarkers_SeqSELL()
809 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonalMarkers_SeqSELL()
883 PetscCall(PetscArrayzero(a->val, a->sliidx[a->totalslices])); in MatZeroEntries_SeqSELL()
898 PetscCall(PetscFree(a->sliidx)); in MatDestroy_SeqSELL()
983 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatGetDiagonal_SeqSELL()
1011 … for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = (row + 1) % a->sliceheight) { 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()
1027 … for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = ((row + 1) % a->sliceheight)) { 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()
1055 … shift = a->sliidx[row / a->sliceheight] + (row % a->sliceheight); /* starting index of the row */ in MatGetValues_SeqSELL()
1108 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1135 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1157 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_ASCII()
1168 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1199 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1212 …ice %" 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()
1231 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1279 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_ASCII()
1326 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatView_SeqSELL_Draw_Zoom()
1338 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1350 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1367 for (i = 0; i < a->sliidx[a->totalslices]; i++) { in MatView_SeqSELL_Draw_Zoom()
1376 shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; in MatView_SeqSELL_Draw_Zoom()
1448 …edzeros)\n", A->rmap->n, A->cmap->n, a->maxallocmat, a->sliidx[a->totalslices], a->nz, a->sliidx[a… in MatAssemblyEnd_SeqSELL()
1454 …shift = a->sliidx[i]; /* starting index of the s… 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()
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()
1549 shift = a->sliidx[row / a->sliceheight] + row % a->sliceheight; /* starting index of the row */ in MatSetValues_SeqSELL()
1592 …MatSeqXSELLReallocateSELL(A, A->rmap->n, 1, nrow, a->sliidx, a->sliceheight, row / a->sliceheight,… in MatSetValues_SeqSELL()
1595 …MatSeqXSELLReallocateSELL(A, A->rmap->n, 1, nrow, a->sliidx, a->sliceheight, row / a->sliceheight,… in MatSetValues_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()
1715 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1727 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1745 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_SeqSELL()
1760 … shift = a->sliidx[i / a->sliceheight] + i % a->sliceheight; /* starting index of the row i */ in MatSOR_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()
1977 current_slicewidth = (a->sliidx[i + 1] - a->sliidx[i]) / a->sliceheight; 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
2002 mean = (PetscReal)sliidx[totalslices] / totalslices; in MatSeqSELLGetVarSliceSize_SeqSELL()
2003 …talslices; i++) *variance += ((PetscReal)(sliidx[i] - sliidx[i - 1]) - mean) * ((PetscReal)(sliidx… in MatSeqSELLGetVarSliceSize_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()
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()