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

Defines the container to represent an infinite collection of elements. More...

Public Member Functions

 repeat_container (value_type val)
 
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 value_type = T
 
using reference = T &
 
using const_reference = T const &
 
using domain_type = typename std::conditional< N==1, infinite, infinite_nd< N > >::type
 
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, N >
 
using distribution_type = repeat_container_distribution< domain_type, T, N, IsReadOnly, IsView >
 
using task_placement_dontcare = std::true_type
 

Public Attributes

value_type m_data
 
distribution_type m_dist
 

Detailed Description

template<typename T, int N, bool IsReadOnly, bool IsView>
struct stapl::view_impl::repeat_container< T, N, IsReadOnly, IsView >

Defines the container to represent an infinite collection of elements.

Template Parameters
Telement type to repeat

Member Function Documentation

◆ apply_get()

template<typename T , int N, bool IsReadOnly, bool IsView>
template<typename F >
F::result_type stapl::view_impl::repeat_container< T, N, IsReadOnly, IsView >::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: