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

Main class to define a pView, composed of a reference to a collection of elements, a domain and a mapping function. More...

Public Member Functions

core_viewoperator= (core_view const &)=default
 
 core_view (core_view &&)=default
 
 core_view (core_view const &other)
 core_view constructor based on another view. More...
 
 core_view (view_container_type *vcont, domain_type const &dom, map_func_type mfunc=MapFunc())
 Constructor based on a container pointer. The views takes ownership over the passed underlying container. More...
 
 core_view (view_container_type const &vcont, domain_type const &dom, map_func_type mfunc=MapFunc())
 core_view constructor based on a container reference. More...
 
bool is_valid (void) const
 
view_container_type * get_container (void) const
 
view_container_type & container (void)
 
view_container_type & container (void) const
 
domain_type const & domain (void) const
 
domain_type & domain (void)
 
void set_domain (domain_type const &dom)
 
map_func_type const & mapfunc (void) const
 
size_type size (void) const
 Returns the number of elements referenced for the view.
 
bool empty (void) const
 Returns true if the view does not reference any element.
 

Public Types

typedef C view_container_type
 
typedef Dom domain_type
 
typedef MapFunc map_func_type
 
typedef mf_type_helper::index_type index_type
 
typedef mf_type_helper::gid_type gid_type
 
typedef std::size_t size_type
 

Public Attributes

C * m_ptr
 
sptr_type m_sptr
 

Protected Member Functions

C * container_ptr (void) const
 Returns the container's pointer.
 

Detailed Description

template<typename C, typename Dom, typename MapFunc>
class stapl::core_view< C, Dom, MapFunc >

Main class to define a pView, composed of a reference to a collection of elements, a domain and a mapping function.

Template Parameters
CContainer type.
DomDomain type.
MapFuncMapping function type.

Constructor & Destructor Documentation

◆ core_view() [1/3]

template<typename C, typename Dom, typename MapFunc>
stapl::core_view< C, Dom, MapFunc >::core_view ( core_view< C, Dom, MapFunc > const &  other)

core_view constructor based on another view.

This constructor creates a view from another view. When we coarsen to base containers there is no versioning.

Parameters
otherThe other view to copy from.

◆ core_view() [2/3]

template<typename C, typename Dom, typename MapFunc>
stapl::core_view< C, Dom, MapFunc >::core_view ( view_container_type *  vcont,
domain_type const &  dom,
map_func_type  mfunc = MapFunc() 
)

Constructor based on a container pointer. The views takes ownership over the passed underlying container.

Parameters
vcontpointer to the container used to forward the operations.
domdomain to be used by the view.
mfuncmapping function to transform view indices to container gids.

◆ core_view() [3/3]

template<typename C, typename Dom, typename MapFunc>
stapl::core_view< C, Dom, MapFunc >::core_view ( view_container_type const &  vcont,
domain_type const &  dom,
map_func_type  mfunc = MapFunc() 
)

core_view constructor based on a container reference.

This constructor creates a view that doesn't take ownership over the container.

Parameters
vcontreference to the container used to forward the operations.
domdomain to be used by the view.
mfuncmapping function to transform view indices to container gids.

Member Function Documentation

◆ get_container()

template<typename C, typename Dom, typename MapFunc>
view_container_type* stapl::core_view< C, Dom, MapFunc >::get_container ( void  ) const

◆ container()

template<typename C, typename Dom, typename MapFunc>
view_container_type& stapl::core_view< C, Dom, MapFunc >::container ( void  ) const

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