Home
last modified time | relevance | path

Searched refs:newnmax (Results 1 – 2 of 2) sorted by relevance

/petsc/src/vec/vec/utils/
H A Dvecstash.c178 PetscInt *n_idx, newnmax, bs = stash->bs; in VecStashExpand_Private() local
184 if (stash->umax) newnmax = stash->umax / bs; in VecStashExpand_Private()
185 else newnmax = DEFAULT_STASH_SIZE / bs; in VecStashExpand_Private()
187 if (stash->umax > stash->oldnmax) newnmax = stash->umax / bs; in VecStashExpand_Private()
188 else newnmax = stash->oldnmax / bs; in VecStashExpand_Private()
189 } else newnmax = stash->nmax * 2; in VecStashExpand_Private()
191 if (newnmax < (stash->nmax + incr)) newnmax += 2 * incr; in VecStashExpand_Private()
193 PetscCall(PetscMalloc2(bs * newnmax, &n_array, newnmax, &n_idx)); in VecStashExpand_Private()
200 stash->nmax = newnmax; in VecStashExpand_Private()
/petsc/src/mat/utils/
H A Dmatstash.c221 PetscInt newnmax, bs2 = stash->bs * stash->bs; in MatStashExpand_Private() local
234 PetscCall(PetscIntCast(cnewnmax, &newnmax)); in MatStashExpand_Private()
237 PetscCall(PetscMatStashSpaceGet(bs2, newnmax, &stash->space)); in MatStashExpand_Private()
243 stash->nmax = newnmax; in MatStashExpand_Private()