STAPL API Reference |
Modules Classes |
Class for generating vertex descriptors with a strided pattern.Used by the dynamic graph to add vertices when descriptors are not provided by users. More...
Public Member Functions | |
vdg_strided (size_t start=std::numeric_limits< size_t >::max(), size_t block=10, size_t parts=stapl::get_num_locations(), size_t index=stapl::get_location_id(), bool next=true) | |
Constructor to initialize the strided generator. More... | |
vertex_descriptor | next () |
Generates and returns the next vertex and updates internal version. | |
void | free (VD const &) |
Possibly reclaims descriptors for future use from deleted vertices. Provided for compatibility. | |
bool | is_valid (VD const &) |
Compares the version numbers to see if the iterator is valid. Provided for compatibility with versioning generators. | |
void | increment () |
Manually increment the version number, if needed for some storage. Provided for compatibility with versioning generators. | |
void | update (VD const &vd) |
Integrates the current descriptor into the generated sequence; future invocations of next() should not produce this VD. | |
VD | curr_vd () const |
Returns the current descriptor. | |
void | reset () |
Resets the generator to restart producing descriptors. To be used after clearing the graph. | |
Public Types | |
typedef VD | vertex_descriptor |
Protected Attributes | |
size_t | m_curr_vd |
The current vertex-descriptor. | |
size_t | m_block |
The block-size for generating descriptors. | |
size_t | m_parts |
The number of partitions in the pGraph globally. | |
size_t | m_index |
The index of this object in the partitions. | |
bool | m_use_next |
Class for generating vertex descriptors with a strided pattern.
Used by the dynamic graph to add vertices when descriptors are not provided by users.
stapl::vdg_strided< VD >::vdg_strided | ( | size_t | start = std::numeric_limits<size_t>::max() , |
size_t | block = 10 , |
||
size_t | parts = stapl::get_num_locations() , |
||
size_t | index = stapl::get_location_id() , |
||
bool | next = true |
||
) |
Constructor to initialize the strided generator.
start | The descriptor to start the allocation from. |
block | The block size for generating descriptors. |
parts | The number of global partitions in the pGraph. |
index | The index of this partition among the global partitions. |
next | (Unused). |