46 pages.push_back(std::move(p));
50 if (n <= 0)
return nullptr;
53 std::cerr <<
"PageAllocator::allocate error: request " << n <<
" larger than page size " <<
pgsize << std::endl;
Definition neighbor_list.h:77
int nlocal
Definition neighbor_list.h:82
std::vector< int > numneigh
Definition neighbor_list.h:84
std::vector< int * > firstneigh
Definition neighbor_list.h:85
void reset()
Definition neighbor_list.h:97
PageAllocator allocator
Definition neighbor_list.h:87
void initialize(int n, int pgsize)
Definition neighbor_list.h:89
Definition neighbor_list.h:8
~PageAllocator()
Definition neighbor_list.h:30
PageAllocator(int pgsize_)
Definition neighbor_list.h:26
int * allocate(int n)
Definition neighbor_list.h:49
static constexpr int DEFAULT_PGSIZE
Definition neighbor_list.h:19
std::vector< Page > pages
Definition neighbor_list.h:16
void reset()
Definition neighbor_list.h:67
void new_page()
Definition neighbor_list.h:41
PageAllocator & operator=(PageAllocator &&)=default
PageAllocator()
Definition neighbor_list.h:22
PageAllocator & operator=(const PageAllocator &)=delete
PageAllocator(const PageAllocator &)=delete
PageAllocator(PageAllocator &&)=default
int pgsize
Definition neighbor_list.h:17
Definition neighbor_list.h:10
int capacity
Definition neighbor_list.h:12
std::vector< int > data
Definition neighbor_list.h:11
int offset
Definition neighbor_list.h:13