STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Attributes
stapl::vdg_strided< VD > Class Template Reference

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
 

Detailed Description

template<class VD>
class stapl::vdg_strided< VD >

Class for generating vertex descriptors with a strided pattern.

Used by the dynamic graph to add vertices when descriptors are not provided by users.

Constructor & Destructor Documentation

◆ vdg_strided()

template<class VD>
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.

Parameters
startThe descriptor to start the allocation from.
blockThe block size for generating descriptors.
partsThe number of global partitions in the pGraph.
indexThe index of this partition among the global partitions.
next(Unused).

The documentation for this class was generated from the following file: