Thrill  0.1
ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false > Class Template Reference

Detailed Description

template<typename TableItem, typename Key, typename Value, typename KeyExtractor, typename ReduceFunction, const bool VolatileKey, typename BlockWriter, typename ReduceConfig_, typename IndexFunction, typename KeyEqualFunction, typename HashFunction>
class thrill::core::ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false >

Definition at line 103 of file reduce_pre_phase.hpp.

+ Collaboration diagram for ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false >:

#include <reduce_pre_phase.hpp>

Public Types

using Emitter = ReducePrePhaseEmitter< TableItem, VolatileKey, BlockWriter >
 
using MakeTableItem = ReduceMakeTableItem< Value, TableItem, VolatileKey >
 
using ReduceConfig = ReduceConfig_
 
using Table = typename ReduceTableSelect< ReduceConfig::table_impl_, TableItem, Key, Value, KeyExtractor, ReduceFunction, Emitter, VolatileKey, ReduceConfig, IndexFunction, KeyEqualFunction >::type
 

Public Member Functions

 ReducePrePhase (Context &ctx, size_t dia_id, size_t num_partitions, KeyExtractor key_extractor, ReduceFunction reduce_function, std::vector< BlockWriter > &emit, const ReduceConfig &config=ReduceConfig(), const IndexFunction &index_function=IndexFunction(), const KeyEqualFunction &key_equal_function=KeyEqualFunction(), const HashFunction hash_function=HashFunction(), bool duplicates=false)
 A data structure which takes an arbitrary value and extracts a key using a key extractor function from that value. More...
 
 ReducePrePhase (const ReducePrePhase &)=delete
 non-copyable: delete copy-constructor More...
 
void CloseAll ()
 Closes all emitter. More...
 
void FlushAll ()
 Flush all partitions. More...
 
void FlushPartition (size_t partition_id, bool consume, bool grow)
 Flushes a partition. More...
 
void Initialize (size_t limit_memory_bytes)
 
void InitializeSkip ()
 
bool Insert (const Value &v)
 
void InsertSkip (const Value &v)
 
ReducePrePhaseoperator= (const ReducePrePhase &)=delete
 non-copyable: delete assignment operator More...
 
Accessors
size_t num_items () const
 Returns the total num of items in the table. More...
 
common::Range key_range (size_t partition_id)
 calculate key range for the given output partition More...
 

Protected Attributes

Emitter emit_
 Emitters used to parameterize hash table for output to network. More...
 
KeyExtractor key_extractor_
 extractor function which maps a value to it's key More...
 
Table table_
 the first-level hash table implementation More...
 

Static Private Attributes

static constexpr bool debug = false
 

Member Typedef Documentation

◆ Emitter

using Emitter = ReducePrePhaseEmitter<TableItem, VolatileKey, BlockWriter>

Definition at line 116 of file reduce_pre_phase.hpp.

◆ MakeTableItem

using MakeTableItem = ReduceMakeTableItem<Value, TableItem, VolatileKey>

Definition at line 117 of file reduce_pre_phase.hpp.

◆ ReduceConfig

using ReduceConfig = ReduceConfig_

Definition at line 115 of file reduce_pre_phase.hpp.

◆ Table

using Table = typename ReduceTableSelect< ReduceConfig::table_impl_, TableItem, Key, Value, KeyExtractor, ReduceFunction, Emitter, VolatileKey, ReduceConfig, IndexFunction, KeyEqualFunction>::type

Definition at line 123 of file reduce_pre_phase.hpp.

Constructor & Destructor Documentation

◆ ReducePrePhase() [1/2]

ReducePrePhase ( Context ctx,
size_t  dia_id,
size_t  num_partitions,
KeyExtractor  key_extractor,
ReduceFunction  reduce_function,
std::vector< BlockWriter > &  emit,
const ReduceConfig config = ReduceConfig(),
const IndexFunction &  index_function = IndexFunction(),
const KeyEqualFunction &  key_equal_function = KeyEqualFunction(),
const HashFunction  hash_function = HashFunction(),
bool  duplicates = false 
)
inline

A data structure which takes an arbitrary value and extracts a key using a key extractor function from that value.

Afterwards, the value is hashed based on the key into some slot.

Definition at line 130 of file reduce_pre_phase.hpp.

References sLOG, and tlx::unused().

◆ ReducePrePhase() [2/2]

ReducePrePhase ( const ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false > &  )
delete

non-copyable: delete copy-constructor

Member Function Documentation

◆ CloseAll()

void CloseAll ( )
inline

Closes all emitter.

Definition at line 192 of file reduce_pre_phase.hpp.

◆ FlushAll()

void FlushAll ( )
inline

Flush all partitions.

Definition at line 179 of file reduce_pre_phase.hpp.

◆ FlushPartition()

void FlushPartition ( size_t  partition_id,
bool  consume,
bool  grow 
)
inline

Flushes a partition.

Definition at line 186 of file reduce_pre_phase.hpp.

◆ Initialize()

void Initialize ( size_t  limit_memory_bytes)
inline

Definition at line 159 of file reduce_pre_phase.hpp.

◆ InitializeSkip()

void InitializeSkip ( )
inline

Definition at line 163 of file reduce_pre_phase.hpp.

◆ Insert()

bool Insert ( const Value &  v)
inline

Definition at line 167 of file reduce_pre_phase.hpp.

◆ InsertSkip()

void InsertSkip ( const Value &  v)
inline

Definition at line 172 of file reduce_pre_phase.hpp.

◆ key_range()

common::Range key_range ( size_t  partition_id)
inline

calculate key range for the given output partition

Definition at line 204 of file reduce_pre_phase.hpp.

◆ num_items()

size_t num_items ( ) const
inline

Returns the total num of items in the table.

Definition at line 201 of file reduce_pre_phase.hpp.

◆ operator=()

ReducePrePhase& operator= ( const ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false > &  )
delete

non-copyable: delete assignment operator

Member Data Documentation

◆ debug

constexpr bool debug = false
staticprivate

Definition at line 112 of file reduce_pre_phase.hpp.

◆ emit_

Emitter emit_
protected

Emitters used to parameterize hash table for output to network.

Definition at line 211 of file reduce_pre_phase.hpp.

◆ key_extractor_

KeyExtractor key_extractor_
protected

extractor function which maps a value to it's key

Definition at line 214 of file reduce_pre_phase.hpp.

◆ table_

Table table_
protected

the first-level hash table implementation

Definition at line 217 of file reduce_pre_phase.hpp.


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