STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Static Public Member Functions
stapl::detail::fast_view_builder< CastView, bool, bool > Class Template Reference

Helper class used to cast given view instance to one over the provided base container instance. More...

Static Public Member Functions

template<typename View >
static CastView create (View const &v, component_type *c)
 
template<typename View >
static CastView * create_new_or_get_component (View const &v, component_type *c)
 

Detailed Description

template<typename CastView, bool = is_view<CastView>::value, bool = is_segmented_view<CastView>::value>
class stapl::detail::fast_view_builder< CastView, bool, bool >

Helper class used to cast given view instance to one over the provided base container instance.

This primary template is used when the view is derived from a Segmented. It constructs the cast view instance by re-creating the underlying view (hierarchy) on heap, using reference to the base container at the bottom-most level, and passing the pointer to the result alongside the reference to the original segmented_view to the segmented_view constructor that takes ownership of the reconstructed view (hierarchy).

Template Parameters
CastViewType of the cast view to be instantiated.
See also
Segmented

Member Function Documentation

◆ create()

template<typename CastView , bool = is_view<CastView>::value, bool = is_segmented_view<CastView>::value>
template<typename View >
static CastView stapl::detail::fast_view_builder< CastView, bool, bool >::create ( View const &  v,
component_type *  c 
)
static

Creates the cast view by recursively heap-allocating the underlying views until the bottom-most container is hit, in which case the reference to the provided component (base container) is used.


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