STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions | Protected Types | Protected Attributes
stapl::lightweight_multiarray_base< T, dims, Init > Struct Template Reference

A base class for lightweight sequential containers used in the skeleton framework applications such as the NAS IS and FT benchmarks. This class wraps an std::vector and keeps a shared_ptr to the underlying std::vector. More...

Public Member Functions

 lightweight_multiarray_base (domain_type const &domain)
 
template<typename... D>
 lightweight_multiarray_base (std::size_t d0, D const &... dimensions)
 
 lightweight_multiarray_base (iterator begin, iterator end)
 
 lightweight_multiarray_base (const_iterator begin, const_iterator end)
 
domain_type domain () const
 
dimensions_type dimensions () const
 
size_type size () const
 
bool empty () const
 

Public Types

using reference = typename content_t::reference
 
using const_reference = typename content_t::const_reference
 
using iterator = typename content_t::iterator
 
using const_iterator = typename content_t::const_iterator
 
using domain_type = indexed_domain< std::size_t, dims >
 
using index_type = typename domain_type::index_type
 
using dimensions_type = typename domain_type::dimensions_type
 
using size_type = std::size_t
 

Protected Member Functions

void resize_domain (dimensions_type const &dimensions)
 

Protected Types

using value_type = T
 
using content_t = typename std::conditional< Init==non_initialized, lightweight_multiarray_storage< value_type >, std::vector< value_type > >::type
 

Protected Attributes

storage_t m_content
 
domain_type m_domain
 

Detailed Description

template<typename T, int dims, init_specifier Init = initialized>
struct stapl::lightweight_multiarray_base< T, dims, Init >

A base class for lightweight sequential containers used in the skeleton framework applications such as the NAS IS and FT benchmarks. This class wraps an std::vector and keeps a shared_ptr to the underlying std::vector.

Note
This class is extended by lightweight_vector and lightweight_multiarray to reduce the copying overhead of large intermediate results between the STAPL layers (Skeleton Framework, PARAGRAPH, and runtime) to copies of shared_ptrs.
Template Parameters
Tthe type of elements to store
dimsthe number of dimensions of this container.
InitSpecify whether initialization of values should occur during construction. Default to regular initialization.

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