Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LocationDetection< HashCount > Class Template Reference

Detailed Description

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

Definition at line 69 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...
 
Context & context_
 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

using CounterType = typename HashCount::CounterType
private

Definition at line 86 of file location_detection.hpp.

using Emitter = ToVectorEmitter<HashCount>

Definition at line 154 of file location_detection.hpp.

Definition at line 84 of file location_detection.hpp.

Definition at line 81 of file location_detection.hpp.

Definition at line 153 of file location_detection.hpp.

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

Definition at line 160 of file location_detection.hpp.

Constructor & Destructor Documentation

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

Definition at line 162 of file location_detection.hpp.

Member Function Documentation

void Dispose ( )
inline

Definition at line 358 of file location_detection.hpp.

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 192 of file location_detection.hpp.

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 178 of file location_detection.hpp.

void Insert ( const HashCount &  item)
inline

Inserts a HashCount item into the table.

Definition at line 185 of file location_detection.hpp.

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

Member Data Documentation

ReduceConfig config_

Reduce configuration used.

Definition at line 371 of file location_detection.hpp.

Context& context_

Thrill context.

Definition at line 368 of file location_detection.hpp.

Referenced by LocationDetection< thrill::api::JoinNode::HashCount >::Flush().

constexpr bool debug = false
staticprivate

Definition at line 72 of file location_detection.hpp.

size_t dia_id_
Emitter emit_

Emitter to vector.

Definition at line 366 of file location_detection.hpp.

Referenced by LocationDetection< thrill::api::JoinNode::HashCount >::Flush().

std::vector<HashCount> hash_occ_

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