Everett
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
everett::sort_profile_detail::file_bit_sink< P, Ops, Stream > Struct Template Reference

#include <sort_profile_file_writer.h>

Public Member Functions

 file_bit_sink (Stream &stream)
 
std::uint64_t position () const noexcept
 
std::uint64_t buffered_bits () const noexcept
 
bit_view buffered_payload () const &noexcept
 
bit_view buffered_payload () const &&=delete
 
void flush_complete ()
 
void append (bit_view source)
 
void write_bits (std::uint64_t value, unsigned width)
 
template<class Code >
void write_count (std::uint64_t value)
 
void finish_payload ()
 
void align ()
 
void words (std::span< std::uint64_t const > input)
 
void samples (std::span< elias_fano_sample const > input)
 

Static Public Attributes

static constexpr std::size_t buffer_bytes = 64 * 1024
 

Private Member Functions

void zeroes (std::uint64_t count)
 
void flush ()
 

Private Attributes

Stream & stream_
 
std::array< std::byte, buffer_bytes > buffer_ {}
 
std::uint64_t buffered_ = 0
 
std::uint64_t bits_ = 0
 

Constructor & Destructor Documentation

◆ file_bit_sink()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::file_bit_sink ( Stream &  stream)
inlineexplicit

Member Function Documentation

◆ align()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::align ( )
inline

◆ append()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::append ( bit_view  source)
inline

◆ buffered_bits()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
std::uint64_t everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffered_bits ( ) const
inlinenoexcept

◆ buffered_payload() [1/2]

template<class P , class Ops , class Stream = object_stream<P, Ops>>
bit_view everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffered_payload ( ) const &&
delete

◆ buffered_payload() [2/2]

template<class P , class Ops , class Stream = object_stream<P, Ops>>
bit_view everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffered_payload ( ) const &
inlinenoexcept

◆ finish_payload()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::finish_payload ( )
inline

◆ flush()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::flush ( )
inlineprivate

◆ flush_complete()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::flush_complete ( )
inline

◆ position()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
std::uint64_t everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::position ( ) const
inlinenoexcept

◆ samples()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::samples ( std::span< elias_fano_sample const >  input)
inline

◆ words()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::words ( std::span< std::uint64_t const >  input)
inline

◆ write_bits()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::write_bits ( std::uint64_t  value,
unsigned  width 
)
inline

◆ write_count()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
template<class Code >
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::write_count ( std::uint64_t  value)
inline

◆ zeroes()

template<class P , class Ops , class Stream = object_stream<P, Ops>>
void everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::zeroes ( std::uint64_t  count)
inlineprivate

Member Data Documentation

◆ bits_

template<class P , class Ops , class Stream = object_stream<P, Ops>>
std::uint64_t everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::bits_ = 0
private

◆ buffer_

template<class P , class Ops , class Stream = object_stream<P, Ops>>
std::array<std::byte, buffer_bytes> everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffer_ {}
private

◆ buffer_bytes

template<class P , class Ops , class Stream = object_stream<P, Ops>>
constexpr std::size_t everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffer_bytes = 64 * 1024
staticconstexpr

◆ buffered_

template<class P , class Ops , class Stream = object_stream<P, Ops>>
std::uint64_t everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::buffered_ = 0
private

◆ stream_

template<class P , class Ops , class Stream = object_stream<P, Ops>>
Stream& everett::sort_profile_detail::file_bit_sink< P, Ops, Stream >::stream_
private

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