Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

using Emitter = ReducePrePhaseEmitter<TableItem, VolatileKey, BlockWriter>

Definition at line 116 of file reduce_pre_phase.hpp.

using MakeTableItem = ReduceMakeTableItem<Value, TableItem, VolatileKey>

Definition at line 117 of file reduce_pre_phase.hpp.

using ReduceConfig = ReduceConfig_

Definition at line 115 of file reduce_pre_phase.hpp.

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 ( 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 ( const ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig_, IndexFunction, KeyEqualFunction, HashFunction, false > &  )
delete

non-copyable: delete copy-constructor

Member Function Documentation

void CloseAll ( )
inline

Closes all emitter.

Definition at line 192 of file reduce_pre_phase.hpp.

void FlushAll ( )
inline

Flush all partitions.

Definition at line 179 of file reduce_pre_phase.hpp.

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

Flushes a partition.

Definition at line 186 of file reduce_pre_phase.hpp.

void Initialize ( size_t  limit_memory_bytes)
inline

Definition at line 159 of file reduce_pre_phase.hpp.

void InitializeSkip ( )
inline

Definition at line 163 of file reduce_pre_phase.hpp.

bool Insert ( const Value &  v)
inline

Definition at line 167 of file reduce_pre_phase.hpp.

void InsertSkip ( const Value &  v)
inline

Definition at line 172 of file reduce_pre_phase.hpp.

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.

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.

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

constexpr bool debug = false
staticprivate

Definition at line 112 of file reduce_pre_phase.hpp.

Emitter emit_
protected

Emitters used to parameterize hash table for output to network.

Definition at line 211 of file reduce_pre_phase.hpp.

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_
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: