Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Src/Base/AMReX_PODVector.H
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,20 @@ namespace amrex
}
}

void resize_geometric_grow (size_type a_new_size)
{
auto old_size = m_size;
if (m_capacity < a_new_size) {
size_type new_capacity = std::max(a_new_size, GetNewCapacityForPush());
reserve(new_capacity);
}
m_size = a_new_size;
if (old_size < a_new_size) {
detail::maybe_init_snan(m_data + old_size,
m_size - old_size, (Allocator const&)(*this));
}
}

void reserve (size_type a_capacity)
{
if (m_capacity < a_capacity) {
Expand Down
Loading
Loading