Thrill  0.1
LocationDetection< HashCount > Class Template Reference

Detailed Description

template<typename HashCount>
class thrill::core::LocationDetection< HashCount >

Definition at line 70 of file location_detection.hpp.

+ Inheritance diagram for LocationDetection< HashCount >:
+ Collaboration diagram for LocationDetection< HashCount >:

#include <location_detection.hpp>

Classes

struct  ExtractHash
 
class  GolombPairReader
 

Public Types

using Emitter = ToVectorEmitter< HashCount >
 
using ReduceConfig = DefaultReduceConfig
 
using Table = typename ReduceTableSelect< ReduceConfig::table_impl_, HashCount, typename HashCount::HashType, HashCount, ExtractHash, std::plus< HashCount >, Emitter, false, ReduceConfig >::type
 

Public Member Functions

 LocationDetection (Context &ctx, size_t dia_id, const ReduceConfig &config=ReduceConfig())
 
void Dispose ()
 
size_t Flush (std::unordered_map< size_t, size_t > &target_processors)
 Flushes the table and detects the most common location for each element. More...
 
void Initialize (size_t limit_memory_bytes)
 Initializes the table to the memory limit size. More...
 
void Insert (const HashCount &item)
 Inserts a HashCount item into the table. More...
 

Public Attributes

ReduceConfig config_
 Reduce configuration used. More...
 
Contextcontext_
 Thrill context. More...
 
size_t dia_id_
 
Emitter emit_
 Emitter to vector. More...
 
std::vector< HashCount > hash_occ_
 Target vector for vector emitter. More...
 
Table table_
 Reduce table used to count keys. More...
 

Private Types

using CounterType = typename HashCount::CounterType
 
using GolombBitStreamReader = core::GolombBitStreamReader< data::CatStream::Reader >
 
using GolombBitStreamWriter = core::GolombBitStreamWriter< data::CatStream::Writer >
 
using GolumbDeltaReader = core::DeltaStreamReader< GolombBitStreamReader, size_t, 1 >
 
using GolumbDeltaWriter = core::DeltaStreamWriter< GolombBitStreamWriter, size_t, 1 >
 

Private Member Functions

void WriteOccurenceCounts (const data::CatStreamPtr &stream_pointer, const std::vector< HashCount > &hash_occ, size_t golomb_param, size_t num_workers, size_t max_hash)
 

Static Private Attributes

static constexpr bool debug = false
 

Member Typedef Documentation

◆ CounterType

using CounterType = typename HashCount::CounterType
private

Definition at line 87 of file location_detection.hpp.

◆ Emitter

using Emitter = ToVectorEmitter<HashCount>

Definition at line 155 of file location_detection.hpp.

◆ GolombBitStreamReader

◆ GolombBitStreamWriter

◆ GolumbDeltaReader

Definition at line 85 of file location_detection.hpp.

◆ GolumbDeltaWriter

Definition at line 82 of file location_detection.hpp.

◆ ReduceConfig

Definition at line 154 of file location_detection.hpp.

◆ Table

using Table = typename ReduceTableSelect< ReduceConfig::table_impl_, HashCount, typename HashCount::HashType, HashCount, ExtractHash, std::plus<HashCount>, Emitter, false, ReduceConfig>::type

Definition at line 161 of file location_detection.hpp.

Constructor & Destructor Documentation

◆ LocationDetection()

LocationDetection ( Context ctx,
size_t  dia_id,
const ReduceConfig config = ReduceConfig() 
)
inline

Definition at line 163 of file location_detection.hpp.

Member Function Documentation

◆ Dispose()

void Dispose ( )
inline

Definition at line 359 of file location_detection.hpp.

◆ Flush()

size_t Flush ( std::unordered_map< size_t, size_t > &  target_processors)
inline

Flushes the table and detects the most common location for each element.

Definition at line 193 of file location_detection.hpp.

◆ Initialize()

void Initialize ( size_t  limit_memory_bytes)
inline

Initializes the table to the memory limit size.

Parameters
limit_memory_bytesMemory limit in bytes

Definition at line 179 of file location_detection.hpp.

◆ Insert()

void Insert ( const HashCount &  item)
inline

Inserts a HashCount item into the table.

Definition at line 186 of file location_detection.hpp.

◆ WriteOccurenceCounts()

void WriteOccurenceCounts ( const data::CatStreamPtr stream_pointer,
const std::vector< HashCount > &  hash_occ,
size_t  golomb_param,
size_t  num_workers,
size_t  max_hash 
)
inlineprivate

Definition at line 118 of file location_detection.hpp.

Member Data Documentation

◆ config_

ReduceConfig config_

Reduce configuration used.

Definition at line 372 of file location_detection.hpp.

◆ context_

Context& context_

Thrill context.

Definition at line 369 of file location_detection.hpp.

◆ debug

constexpr bool debug = false
staticprivate

Definition at line 73 of file location_detection.hpp.

◆ dia_id_

size_t dia_id_

Definition at line 370 of file location_detection.hpp.

◆ emit_

Emitter emit_

Emitter to vector.

Definition at line 367 of file location_detection.hpp.

◆ hash_occ_

std::vector<HashCount> hash_occ_

Target vector for vector emitter.

Definition at line 365 of file location_detection.hpp.

◆ table_

Table table_

Reduce table used to count keys.

Definition at line 374 of file location_detection.hpp.


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