STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::view_impl::repeat_container< Q, 1, true, true > Struct Template Reference

Specialization when repeated element is a view. More...

Public Member Functions

fast_container_type & fast_container (void) const
 Return a reference to the local copy, if initialized.
 
 repeat_container (Q const &view)
 Initializes copy of view to repeated and based on a threshold predicate (for now fundamental element type and view.size() < 10000), fire off an asynchronous PARAGRAPH to populate a local copy of the view. Avoids communications for reads later. More...
 
bool is_local (void) const
 Queried by localization process during PARAGRAPH execution. If the local_copy is will be used, then the handle (proxy) to the value to be fulfilled by a PARAGRAPH has been initialized.
 
distribution_type & distribution (void)
 
reference operator[] (index_type)
 
value_type get_element (index_type) const
 
template<typename F >
F::result_type apply_get (gid_type const &gid, F const &f)
 Applies a function f to the element specified by the GID, and returns the result. More...
 
size_type size (void) const
 Return the number of elements associated with this container, in this case is infinite (maximum value of size_t)
 
domain_type domain (void) const
 
constexpr locality_info locality (size_t) const
 

Public Types

using fast_container_type = std::vector< val_t >
 
using value_type = Q
 
using reference = Q &
 
using const_reference = Q const &
 
using domain_type = infinite
 
using dimensions_type = typename dimension_traits< domain_type >::type
 
using dimension_type = dimensions_type
 
using index_type = typename domain_type::index_type
 
using gid_type = index_type
 
using cid_type = index_type
 
using size_type = typename domain_type::size_type
 
using loc_dist_metadata = infinite_locality_metadata< repeat_container, 1 >
 
using distribution_type = repeat_container_distribution< domain_type, Q, 1, true, true >
 
using task_placement_dontcare = std::true_type
 

Detailed Description

template<typename Q>
struct stapl::view_impl::repeat_container< Q, 1, true, true >

Specialization when repeated element is a view.

Fetches a local copy of the distributed when size is below a given threshold. If this local copy is populated, use it during fast view transformations during algorithm execution.

Template Parameters
Qelement type to repeat

Constructor & Destructor Documentation

◆ repeat_container()

template<typename Q >
stapl::view_impl::repeat_container< Q, 1, true, true >::repeat_container ( Q const &  view)

Initializes copy of view to repeated and based on a threshold predicate (for now fundamental element type and view.size() < 10000), fire off an asynchronous PARAGRAPH to populate a local copy of the view. Avoids communications for reads later.

Member Function Documentation

◆ apply_get()

template<typename Q >
template<typename F >
F::result_type stapl::view_impl::repeat_container< Q, 1, true, true >::apply_get ( gid_type const &  gid,
F const &  f 
)

Applies a function f to the element specified by the GID, and returns the result.

Parameters
gidThe GID of the element.
fThe Functor to apply on the element.
Returns
The result of applying the functor to the element.

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