Lines Matching refs:chunk
450 for (auto &chunk : chunks_) { in try_allocate_chunk() local
451 PetscCall(chunk.claim(stream, req_size, success, serialize)); in try_allocate_chunk()
453 *ptr = mem_ + chunk.start(); in try_allocate_chunk()
516 chunk_type *chunk = nullptr; in try_deallocate_chunk() local
519 PetscCall(try_find_chunk(*ptr, &chunk)); in try_deallocate_chunk()
520 if (chunk) { in try_deallocate_chunk()
521 PetscCall(chunk->release(stream)); in try_deallocate_chunk()
547 for (auto &chunk : chunks_) { in try_find_chunk() local
548 if (chunk.contains(offset)) { in try_find_chunk()
549 *ret_chunk = &chunk; in try_find_chunk()
869 chunk_type *chunk = nullptr; in reallocate() local
883 PetscCall(block.try_find_chunk(old_ptr, &chunk)); in reallocate()
884 if (chunk) break; // found in reallocate()
886 …PetscAssert(chunk, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Memory pool does not own %p, so cannot r… in reallocate()
888 if (chunk->capacity() < new_size) { in reallocate()
891 PetscCall(chunk->release(stream)); in reallocate()
896 PetscCall(chunk->resize(new_size)); in reallocate()