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 Types | Public Member Functions | Friends | List of all members
cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator Class Reference

#include <base_rdd.h>

Inheritance diagram for cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator:

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = ValueType
 
using CacheIterator = std::ranges::iterator_t< const CacheType >
 
using OriginalIterator = DerivedSplitIterator
 

Public Member Functions

 Iterator (const CacheIterator &iterator)
 
 Iterator (const OriginalIterator &iterator)
 
value_type operator* () const
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
bool operator== (const Iterator &other) const
 
bool operator!= (const Iterator &other) const
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 
Iteratoroperator+= (const difference_type &n)
 
Iteratoroperator-= (const difference_type &n)
 
Iterator operator+ (const difference_type &n) const
 
Iterator operator- (const difference_type &n) const
 
value_type operator[] (const difference_type &n) const
 
difference_type operator- (const Iterator &other) const
 
bool operator< (const Iterator &other) const
 
bool operator> (const Iterator &other) const
 
bool operator<= (const Iterator &other) const
 
bool operator>= (const Iterator &other) const
 

Friends

Iterator operator+ (const difference_type &n, const Iterator &iter)
 

Detailed Description

template<typename DerivedSplit, typename DerivedSplitIterator>
class cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator

A special kind of iterator, who will possibly read the data using the iterator from DerivedSplit, or read the data from the execution context's cache, depending on how this iterator is initialized. This iterator is a random_access_iterator.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::Iterator ( const CacheIterator &  iterator)
inlineexplicit

If the iterator is initialized from this constructor, it will read values from cache.

◆ Iterator() [2/2]

cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::Iterator ( const OriginalIterator &  iterator)
inlineexplicit

If the iterator is initialized from this constructor, it will read values from DerivedSplit.

Member Function Documentation

◆ operator+()

Iterator cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::operator+ ( const difference_type &  n) const
inline

◆ operator++() [1/2]

Moves the iterator to point to the next element, returns the incremented iterator.

◆ operator++() [2/2]

Moves the iterator to point to the next element, returns the original iterator.

◆ operator+=()

Iterator & cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::operator+= ( const difference_type &  n)
inline

Forward the iterator to the next n-th element. It has a calculate-cache-on-miss behavior. See CacheSplit's docs for more details.

◆ operator-()

difference_type cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::operator- ( const Iterator other) const
inline

Get the difference between iterators. calculate-cache-on-miss behavior. Throws if two iterators are not of the same actual type (cached or original).

◆ operator--() [1/2]

Moves the iterator to point to the previous element, returns the decremented iterator. It has a calculate-cache-on-miss behavior. See CacheSplit's docs for more details.

◆ operator--() [2/2]

Moves the iterator to point to the previous element, returns the old iterator. It has a calculate-cache-on-miss behavior. See CacheSplit's docs for more details.

◆ operator-=()

Iterator & cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::operator-= ( const difference_type &  n)
inline

Move the iterator to the previous n-th element. It has a calculate-cache-on-miss behavior. See CacheSplit's docs for more details.

◆ operator==()

Two Iterator-s are equal if and only if they read the elements from the same source (both are reading from cache, or both are reading from original iterator), and they also point to the same value.

◆ operator[]()

value_type cpark::CachedSplit< DerivedSplit, DerivedSplitIterator >::Iterator::operator[] ( const difference_type &  n) const
inline

Get the next n-th element. calculate-cache-on-miss.

Friends And Related Symbol Documentation

◆ operator+

Iterator operator+ ( const difference_type &  n,
const Iterator iter 
)
friend

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