vecmem 1.14.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vecmem::details::binary_page_memory_resource_impl::page_ref Struct Reference

Helper class to refer to pages in superpages. More...

#include </home/runner/work/vecmem/vecmem/core/src/memory/details/binary_page_memory_resource_impl.hpp>

Public Member Functions

 page_ref ()=delete
 Delete the meaningless default constructor.
 
 page_ref (const page_ref &)=default
 Default implementation of copy constructor.
 
 page_ref (page_ref &&)=default
 Default implementation of move constructor.
 
 page_ref (superpage &, std::size_t)
 Construct a page from a superpage and an index into that superpage.
 
page_refoperator= (page_ref &&)=default
 Default implementation of move assignment.
 
bool operator== (const page_ref &) const
 Equality operator of pages.
 
bool operator!= (const page_ref &) const
 Inquality operator of pages.
 
std::size_t get_size () const
 Return the size (log_2) of the page referenced.
 
page_state get_state () const
 Return the state of the page referenced.
 
voidget_addr () const
 Return the beginning of the address space represented by this page.
 
page_ref left_child () const
 Obtain a reference to this page's left child.
 
page_ref right_child () const
 Obtain a reference to this page's left child.
 
std::optional< page_refparent () const
 Obtain a reference to this page's parent, if such a node exists.
 
std::optional< page_refsibling () const
 Obtain a reference to this page's sibling, if such a node exists.
 
void unsplit ()
 Unsplit the current page, potentially unsplitting its children, too.
 
void split ()
 Split the current page.
 
void change_state_vacant_to_occupied ()
 Change page state from vacant to occupied.
 
void change_state_occupied_to_vacant ()
 Change page state from occupied to vacant.
 
void change_state_non_extant_to_vacant ()
 Change page state from non-extant to vacant.
 
void change_state_vacant_to_non_extant ()
 Change page state from vacant to non-extant.
 
void change_state_vacant_to_split ()
 Change page state from vacant to split.
 
void change_state_split_to_vacant ()
 Change page state from split to vacant.
 
std::size_t get_index ()
 Get the page index in the superpage.
 

Detailed Description

Helper class to refer to pages in superpages.

We identify individual pages as a tuple of the superpage and their index in that superpage. This class exists to more ergonomically work with these tuples, providing a variety of helper methods.


The documentation for this struct was generated from the following files: