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::BaseRdd< DerivedRdd > Class Template Reference

#include <base_rdd.h>

Inheritance diagram for cpark::BaseRdd< DerivedRdd >:
cpark::GeneratorRdd< Num, Func, T >

Public Member Functions

template<concepts::Rdd R>
 BaseRdd (const BaseRdd< R > &prev, bool copy_id)
 
template<concepts::Rdd R>
 BaseRdd (const BaseRdd< R > &prev)
 
template<concepts::Rdd R>
BaseRddoperator= (const BaseRdd< R > &prev)
 
 BaseRdd (ExecutionContext *context)
 
auto begin () const
 
auto end () const
 
ExecutionContext::RddId id () const noexcept
 

Protected Attributes

ExecutionContextcontext_ {}
 
ExecutionContext::RddId rdd_id_ {}
 
size_t splits_num_ {}
 

Detailed Description

template<typename DerivedRdd>
class cpark::BaseRdd< DerivedRdd >

A base class that holds common interfaces, operations and variables for all different Rdd-s. This class uses CRTP to achieve compile-time polymorphism to avoid the run-time cost of virtual functions.

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

Constructor & Destructor Documentation

◆ BaseRdd() [1/3]

template<typename DerivedRdd >
template<concepts::Rdd R>
cpark::BaseRdd< DerivedRdd >::BaseRdd ( const BaseRdd< R > &  prev,
bool  copy_id 
)
inlineexplicit

Creates a BaseRdd with a previous BaseRdd. The new BaseRdd will have the same execution context and split num with the previous one. If copy_id is true, new BaseRdd will have the same rdd id as the previous one. Otherwise it will be assigned another unique rdd_id.

◆ BaseRdd() [2/3]

template<typename DerivedRdd >
template<concepts::Rdd R>
cpark::BaseRdd< DerivedRdd >::BaseRdd ( const BaseRdd< R > &  prev)
inlineexplicit

Copy constructor for each kind of BaseRdd class.

◆ BaseRdd() [3/3]

template<typename DerivedRdd >
cpark::BaseRdd< DerivedRdd >::BaseRdd ( ExecutionContext context)
inlineexplicit

Creates a new BaseRdd with an execution context. The new BaseRdd will have this execution context and have the same number of splits as configured in the execution context. It will be assigned a unique rdd_id.

Member Function Documentation

◆ begin()

template<typename DerivedRdd >
auto cpark::BaseRdd< DerivedRdd >::begin ( ) const
inline

Returns an forward Iterator that points to the first split contained in this Rdd.

◆ end()

template<typename DerivedRdd >
auto cpark::BaseRdd< DerivedRdd >::end ( ) const
inline

Returns an iterator sentinel which marks the end for the iterators pointing to the splits in this Rdd.

◆ id()

template<typename DerivedRdd >
ExecutionContext::RddId cpark::BaseRdd< DerivedRdd >::id ( ) const
inlinenoexcept

Returns the rdd id.

◆ operator=()

template<typename DerivedRdd >
template<concepts::Rdd R>
BaseRdd & cpark::BaseRdd< DerivedRdd >::operator= ( const BaseRdd< R > &  prev)
inline

Assignment operator for each kind of BaseRdd class.


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