STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes
stapl::composition::ref_cnt_elem_holder< Container > Struct Template Reference

Class used to manage underlying storage for views of coarse_map_reduce. More...

Public Member Functions

 ref_cnt_elem_holder (ref_cnt_elem_holder const &)=delete
 
void increment (void)
 
void decrement (void)
 
Container & container (void)
 

Static Public Member Functions

static ref_cnt_elem_holderallocate (size_t n)
 Return a pointer to an available instance of the class for a container of size n, reusing a container from the recycle bin if possible.
 
static ref_cnt_elem_holderallocate (size_t n, typename Container::value_type const &init)
 Return a pointer to an available instance of the class for a container of size n, reusing a container from the recycle bin if possible. Initialize all elements with value init.
 
static ref_cnt_elem_holderallocate (Container const &other)
 Return a pointer to an available instance of the class for a container of size n, initializing the held container with the same values as other. Reuse a container from the recycle bin if possible. More...
 
static void deallocate_holder (ref_cnt_elem_holder *holder)
 Reclaim buffer in holder that is no longer in use and place it in the recycle bin.
 

Static Public Attributes

static size_t buffer_size
 The container size this class template is serving.
 

Detailed Description

template<typename Container>
struct stapl::composition::ref_cnt_elem_holder< Container >

Class used to manage underlying storage for views of coarse_map_reduce.

Maintains reference count and list of storage from destroyed instances to reduce allocation and increase locality.

Template Parameters
ContainerThe container type held as the the underlying storage.

Member Function Documentation

◆ allocate()

template<typename Container >
static ref_cnt_elem_holder* stapl::composition::ref_cnt_elem_holder< Container >::allocate ( Container const &  other)
static

Return a pointer to an available instance of the class for a container of size n, initializing the held container with the same values as other. Reuse a container from the recycle bin if possible.


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