CPARK 1.0
A light-weighted, distributed computing framework for C++ that offers a fast and general-purpose large data processing solution.
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
cpark::BaseSplit< DerivedSplit > Class Template Reference

#include <base_rdd.h>

Inheritance diagram for cpark::BaseSplit< DerivedSplit >:
cpark::CachedSplit< ViewSplit< V >, std::ranges::iterator_t< const V > > cpark::ViewSplit< V >

Public Member Functions

 BaseSplit (ExecutionContext *context)
 
template<concepts::Split S>
 BaseSplit (const BaseSplit< S > &prev)
 
template<concepts::Split S>
BaseSplitoperator= (const BaseSplit< S > &prev)
 
template<typename T >
 BaseSplit (const BaseSplit< T > &other, bool copy_id, bool copy_dependencies)
 
auto begin () const
 
auto end () const
 
auto dependencies () const noexcept
 
void addDependency (ExecutionContext::SplitId split_id)
 
template<typename T >
void addDependency (const BaseSplit< T > &split)
 
ExecutionContext::SplitId id () const noexcept
 

Protected Attributes

ExecutionContextcontext_ {}
 
ExecutionContext::SplitId split_id_ {}
 
std::vector< ExecutionContext::SplitIddependencies_ {}
 

Detailed Description

template<typename DerivedSplit>
class cpark::BaseSplit< DerivedSplit >

A base Split class containing common data and interfaces for different Splits. This class uses CRTP to achieve compile-time polymorphism to avoid the run-time cost of virtual functions.

Template Parameters
DerivedSplitThe type of the derived split. Derived split class should implement these functions: beginImpl(), endImpl().

Constructor & Destructor Documentation

◆ BaseSplit() [1/3]

template<typename DerivedSplit >
cpark::BaseSplit< DerivedSplit >::BaseSplit ( ExecutionContext context)
inlineexplicit

Initialize the split with context and assign a unique split id to it.

◆ BaseSplit() [2/3]

template<typename DerivedSplit >
template<concepts::Split S>
cpark::BaseSplit< DerivedSplit >::BaseSplit ( const BaseSplit< S > &  prev)
inlineexplicit

Copy constructor for each kind of BaseSplit class.

◆ BaseSplit() [3/3]

template<typename DerivedSplit >
template<typename T >
cpark::BaseSplit< DerivedSplit >::BaseSplit ( const BaseSplit< T > &  other,
bool  copy_id,
bool  copy_dependencies 
)
inline

Copy from another BaseSplit (possibly with different DerivedSplit type). The new BaseSplit will have the same context. If copy_id is true, the new split will have the same split id, otherwise it will have a new unique split id. if copy_dependencies is true, the dependencies will also be copied.

Member Function Documentation

◆ addDependency() [1/2]

template<typename DerivedSplit >
template<typename T >
void cpark::BaseSplit< DerivedSplit >::addDependency ( const BaseSplit< T > &  split)
inline

Adds split's id to the dependencies of the current split.

◆ addDependency() [2/2]

template<typename DerivedSplit >
void cpark::BaseSplit< DerivedSplit >::addDependency ( ExecutionContext::SplitId  split_id)
inline

Adds split_id to the dependencies of the current split.

◆ begin()

template<typename DerivedSplit >
auto cpark::BaseSplit< DerivedSplit >::begin ( ) const
inline

Returns the iterator pointing to the first element in the Split. This function is only an interface. The execution of this function is totally delegated to DerivedSplit::beginImpl().

◆ dependencies()

template<typename DerivedSplit >
auto cpark::BaseSplit< DerivedSplit >::dependencies ( ) const
inlinenoexcept

Returns a range that contains the split id-s of all the direct dependency of the current split.

◆ end()

template<typename DerivedSplit >
auto cpark::BaseSplit< DerivedSplit >::end ( ) const
inline

Returns an iterator sentinel that marks the end of the split's element iterator. This function is only an interface. The execution of this function is totally delegated to DerivedSplit::endImpl().

◆ id()

template<typename DerivedSplit >
ExecutionContext::SplitId cpark::BaseSplit< DerivedSplit >::id ( ) const
inlinenoexcept

Returns the split id.

◆ operator=()

template<typename DerivedSplit >
template<concepts::Split S>
BaseSplit & cpark::BaseSplit< DerivedSplit >::operator= ( const BaseSplit< S > &  prev)
inline

Assignment operator for each kind of BaseSplit class.


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