Thrill  0.1
ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, true > 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 EqualToFunction, typename HashFunction>
class thrill::core::ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, true >

Definition at line 227 of file reduce_pre_phase.hpp.

+ Inheritance diagram for ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, true >:
+ Collaboration diagram for ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, true >:

#include <reduce_pre_phase.hpp>

Public Types

using KeyValuePair = std::pair< Key, Value >
 
using Super = ReducePrePhase< TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, false >
 

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 EqualToFunction &equal_to_function=EqualToFunction(), const HashFunction hash_function=HashFunction())
 
void FlushAll ()
 Flush all partitions. More...
 
void FlushPartition (size_t partition_id, bool consume, bool grow)
 
void Insert (const Value &v)
 

Public Attributes

Duplicate Detection
HashFunction hash_function_
 
std::vector< size_t > hashes_
 Hashes of all keys. More...
 
std::vector< bool > non_duplicates_
 
size_t max_hash_
 Modulo for all hashes in duplicate detection to reduce hash space. More...
 
size_t duplicated_elements_ = 0
 
size_t non_duplicate_elements_ = 0
 

Member Typedef Documentation

◆ KeyValuePair

using KeyValuePair = std::pair<Key, Value>

Definition at line 255 of file reduce_pre_phase.hpp.

◆ Super

using Super = ReducePrePhase<TableItem, Key, Value, KeyExtractor, ReduceFunction, VolatileKey, BlockWriter, ReduceConfig, IndexFunction, EqualToFunction, HashFunction, false>

Definition at line 254 of file reduce_pre_phase.hpp.

Constructor & Destructor Documentation

◆ ReducePrePhase()

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 EqualToFunction &  equal_to_function = EqualToFunction(),
const HashFunction  hash_function = HashFunction() 
)
inline

Definition at line 257 of file reduce_pre_phase.hpp.

Member Function Documentation

◆ FlushAll()

void FlushAll ( )
inline

Flush all partitions.

Definition at line 279 of file reduce_pre_phase.hpp.

References DuplicateDetection::FindNonDuplicates().

◆ FlushPartition()

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

◆ Insert()

void Insert ( const Value &  v)
inline

Definition at line 271 of file reduce_pre_phase.hpp.

Member Data Documentation

◆ duplicated_elements_

size_t duplicated_elements_ = 0

Definition at line 344 of file reduce_pre_phase.hpp.

◆ hash_function_

HashFunction hash_function_

Definition at line 335 of file reduce_pre_phase.hpp.

◆ hashes_

std::vector<size_t> hashes_

Hashes of all keys.

Definition at line 337 of file reduce_pre_phase.hpp.

◆ max_hash_

size_t max_hash_

Modulo for all hashes in duplicate detection to reduce hash space.

Definition at line 342 of file reduce_pre_phase.hpp.

◆ non_duplicate_elements_

size_t non_duplicate_elements_ = 0

Definition at line 345 of file reduce_pre_phase.hpp.

◆ non_duplicates_

std::vector<bool> non_duplicates_

All elements occuring on more than one worker. (Elements not appearing here can be reduced locally)

Definition at line 340 of file reduce_pre_phase.hpp.


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