Everett
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
everett::index_builder< P, Native, Output > Struct Template Reference

#include <index_builder.h>

Public Types

using policy_type = P
 
using native_type = Native
 
using output_type = Output
 
using blob_type = profile_blob< P >
 
using sample_type = profile_sample< P >
 
using coded_sample_type = profile_coded_sample< P >
 

Public Member Functions

 index_builder (blob_type const &source)
 
 index_builder (std::shared_ptr< Native const > native)
 
 index_builder (Output output, std::shared_ptr< Native const > native)
 
 index_builder (index_builder const &)=delete
 
index_builder & operator= (index_builder const &)=delete
 
 index_builder (index_builder &&)=default
 
index_builder & operator= (index_builder &&)=default
 
bool needs_input () const noexcept
 
bool has_output () const noexcept
 
bool done () const noexcept
 
bool finished () const noexcept
 
bool failed () const noexcept
 
std::uint64_t size () const noexcept
 
std::uint64_t received_samples () const noexcept
 
void push (bit_view key, std::uint64_t target_ordinal)
 
void push (coded_sample_type const &sample)
 
void close_input ()
 
std::uint64_t step (std::uint64_t budget_entries)
 
sample_type take_output ()
 
coded_sample_type take_coded_output ()
 
blob_type finish (std::shared_ptr< blob_type const > target={})
 
auto finish_index (std::uint64_t target_count) -> decltype(std::declval< Output & >().finish(std::declval< profile_detail::index_metadata< P > >()))
 

Static Public Attributes

static constexpr std::uint64_t group_size = P::group_size
 

Private Types

enum class  input_mode { unset , full , coded }
 

Private Member Functions

void check_active () const
 
void check_input_slot (std::uint64_t target_ordinal) const
 
void push_key (bit_view key, std::uint64_t target_ordinal)
 
void accept_key (bit_comparison comparison) noexcept
 
bit_comparison compare_heads () const
 

Static Private Member Functions

static Output checked_output (Output output)
 
static std::shared_ptr< Native const > checked_native (std::shared_ptr< Native const > native)
 

Private Attributes

std::shared_ptr< Native const > native_
 
profile_cursor< P, stream_role::native > native_cursor_
 
Output writer_
 
bool incoming_ = false
 
std::optional< coded_sample_type > outgoing_
 
profile_sample_encoder< P > outgoing_encoder_
 
profile_sample_decoder< P > incoming_decoder_
 
rank_groups_builder< group_size > classes_
 
std::uint64_t current_class_ = 0
 
std::vector< std::byte > false_borrows_
 
std::vector< std::uint64_t > cut_lcps_
 
std::uint64_t virtual_count_ = 0
 
std::uint64_t borrowed_count_ = 0
 
std::uint64_t received_ = 0
 
std::uint64_t native_common_ = 0
 
std::uint64_t incoming_common_ = 0
 
std::uint64_t outgoing_common_ = 0
 
std::uint64_t pending_common_ = 0
 
std::uint64_t incoming_borrowed_common_ = 0
 
input_mode input_mode_ = input_mode::unset
 
bool incoming_false_ = false
 
bool previous_false_ = false
 
bool input_closed_ = false
 
bool finished_ = false
 
bool failed_ = false
 

Member Typedef Documentation

◆ blob_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::blob_type = profile_blob<P>

◆ coded_sample_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::coded_sample_type = profile_coded_sample<P>

◆ native_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::native_type = Native

◆ output_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::output_type = Output

◆ policy_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::policy_type = P

◆ sample_type

template<class P , class Native , class Output >
using everett::index_builder< P, Native, Output >::sample_type = profile_sample<P>

Member Enumeration Documentation

◆ input_mode

template<class P , class Native , class Output >
enum class everett::index_builder::input_mode
strongprivate
Enumerator
unset 
full 
coded 

Constructor & Destructor Documentation

◆ index_builder() [1/5]

template<class P , class Native , class Output >
everett::index_builder< P, Native, Output >::index_builder ( blob_type const &  source)
inlineexplicit

◆ index_builder() [2/5]

template<class P , class Native , class Output >
everett::index_builder< P, Native, Output >::index_builder ( std::shared_ptr< Native const >  native)
inlineexplicit

◆ index_builder() [3/5]

template<class P , class Native , class Output >
everett::index_builder< P, Native, Output >::index_builder ( Output  output,
std::shared_ptr< Native const >  native 
)
inline

◆ index_builder() [4/5]

template<class P , class Native , class Output >
everett::index_builder< P, Native, Output >::index_builder ( index_builder< P, Native, Output > const &  )
delete

◆ index_builder() [5/5]

template<class P , class Native , class Output >
everett::index_builder< P, Native, Output >::index_builder ( index_builder< P, Native, Output > &&  )
default

Member Function Documentation

◆ accept_key()

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::accept_key ( bit_comparison  comparison)
inlineprivatenoexcept

◆ check_active()

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::check_active ( ) const
inlineprivate

◆ check_input_slot()

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::check_input_slot ( std::uint64_t  target_ordinal) const
inlineprivate

◆ checked_native()

template<class P , class Native , class Output >
static std::shared_ptr< Native const > everett::index_builder< P, Native, Output >::checked_native ( std::shared_ptr< Native const >  native)
inlinestaticprivate

◆ checked_output()

template<class P , class Native , class Output >
static Output everett::index_builder< P, Native, Output >::checked_output ( Output  output)
inlinestaticprivate

◆ close_input()

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::close_input ( )
inline

◆ compare_heads()

template<class P , class Native , class Output >
bit_comparison everett::index_builder< P, Native, Output >::compare_heads ( ) const
inlineprivate

◆ done()

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::done ( ) const
inlinenoexcept

◆ failed()

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::failed ( ) const
inlinenoexcept

◆ finish()

template<class P , class Native , class Output >
blob_type everett::index_builder< P, Native, Output >::finish ( std::shared_ptr< blob_type const >  target = {})
inline

◆ finish_index()

template<class P , class Native , class Output >
auto everett::index_builder< P, Native, Output >::finish_index ( std::uint64_t  target_count) -> decltype(std::declval<Output &>().finish(std::declval<profile_detail::index_metadata<P>>()))
inline

◆ finished()

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::finished ( ) const
inlinenoexcept

◆ has_output()

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::has_output ( ) const
inlinenoexcept

◆ needs_input()

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::needs_input ( ) const
inlinenoexcept

◆ operator=() [1/2]

template<class P , class Native , class Output >
index_builder & everett::index_builder< P, Native, Output >::operator= ( index_builder< P, Native, Output > &&  )
default

◆ operator=() [2/2]

template<class P , class Native , class Output >
index_builder & everett::index_builder< P, Native, Output >::operator= ( index_builder< P, Native, Output > const &  )
delete

◆ push() [1/2]

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::push ( bit_view  key,
std::uint64_t  target_ordinal 
)
inline

◆ push() [2/2]

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::push ( coded_sample_type const &  sample)
inline

◆ push_key()

template<class P , class Native , class Output >
void everett::index_builder< P, Native, Output >::push_key ( bit_view  key,
std::uint64_t  target_ordinal 
)
inlineprivate

◆ received_samples()

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::received_samples ( ) const
inlinenoexcept

◆ size()

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::size ( ) const
inlinenoexcept

◆ step()

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::step ( std::uint64_t  budget_entries)
inline

◆ take_coded_output()

template<class P , class Native , class Output >
coded_sample_type everett::index_builder< P, Native, Output >::take_coded_output ( )
inline

◆ take_output()

template<class P , class Native , class Output >
sample_type everett::index_builder< P, Native, Output >::take_output ( )
inline

Member Data Documentation

◆ borrowed_count_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::borrowed_count_ = 0
private

◆ classes_

template<class P , class Native , class Output >
rank_groups_builder<group_size> everett::index_builder< P, Native, Output >::classes_
private

◆ current_class_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::current_class_ = 0
private

◆ cut_lcps_

template<class P , class Native , class Output >
std::vector<std::uint64_t> everett::index_builder< P, Native, Output >::cut_lcps_
private

◆ failed_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::failed_ = false
private

◆ false_borrows_

template<class P , class Native , class Output >
std::vector<std::byte> everett::index_builder< P, Native, Output >::false_borrows_
private

◆ finished_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::finished_ = false
private

◆ group_size

template<class P , class Native , class Output >
constexpr std::uint64_t everett::index_builder< P, Native, Output >::group_size = P::group_size
staticconstexpr

◆ incoming_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::incoming_ = false
private

◆ incoming_borrowed_common_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::incoming_borrowed_common_ = 0
private

◆ incoming_common_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::incoming_common_ = 0
private

◆ incoming_decoder_

template<class P , class Native , class Output >
profile_sample_decoder<P> everett::index_builder< P, Native, Output >::incoming_decoder_
private

◆ incoming_false_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::incoming_false_ = false
private

◆ input_closed_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::input_closed_ = false
private

◆ input_mode_

template<class P , class Native , class Output >
input_mode everett::index_builder< P, Native, Output >::input_mode_ = input_mode::unset
private

◆ native_

template<class P , class Native , class Output >
std::shared_ptr<Native const> everett::index_builder< P, Native, Output >::native_
private

◆ native_common_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::native_common_ = 0
private

◆ native_cursor_

template<class P , class Native , class Output >
profile_cursor<P, stream_role::native> everett::index_builder< P, Native, Output >::native_cursor_
private

◆ outgoing_

template<class P , class Native , class Output >
std::optional<coded_sample_type> everett::index_builder< P, Native, Output >::outgoing_
private

◆ outgoing_common_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::outgoing_common_ = 0
private

◆ outgoing_encoder_

template<class P , class Native , class Output >
profile_sample_encoder<P> everett::index_builder< P, Native, Output >::outgoing_encoder_
private

◆ pending_common_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::pending_common_ = 0
private

◆ previous_false_

template<class P , class Native , class Output >
bool everett::index_builder< P, Native, Output >::previous_false_ = false
private

◆ received_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::received_ = 0
private

◆ virtual_count_

template<class P , class Native , class Output >
std::uint64_t everett::index_builder< P, Native, Output >::virtual_count_ = 0
private

◆ writer_

template<class P , class Native , class Output >
Output everett::index_builder< P, Native, Output >::writer_
private

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