38 template <
class P,
class Target,
class Stage>
57 bool done() const noexcept {
64 std::uint64_t
step(std::uint64_t quanta) {
65 if (
finished_ ||
failed_) error_detail::raise<std::logic_error>(
"pipeline is no longer active");
66 std::uint64_t work = 0;
68 while (work != quanta && !
done()) {
69 if (!
advance_one()) error_detail::raise<std::logic_error>(
"index pipeline made no progress");
93 std::vector<std::unique_ptr<Stage>>
stages_;
104 for (std::size_t end =
stages_.size(); end; --end) {
107 if (stage.has_output()) {
109 auto sample = stage.take_coded_output();
114 if (!next.needs_input())
continue;
115 auto sample = stage.take_coded_output();
123 if (stage.done())
continue;
124 if (stage.needs_input()) {
130 auto coded =
source_encoder_.encode(sample.key, sample.target_ordinal);
Outlines exceptional check failures while preserving their types and messages.
Declares Everett's incremental fractional-index builder.
Definition index_pipeline_detail.h:27
std::uint64_t add(std::uint64_t a, std::uint64_t b)
Definition profile.h:39
Definition index_pipeline_detail.h:39
bool finished() const noexcept
Definition index_pipeline_detail.h:60
std::span< std::uint64_t const > emitted_suffix_units() const &noexcept
Definition index_pipeline_detail.h:83
std::vector< std::unique_ptr< Stage > > stages_
Definition index_pipeline_detail.h:93
pipeline_driver & operator=(pipeline_driver &&)=default
bool finished_
Definition index_pipeline_detail.h:98
std::span< std::uint64_t const > emitted_samples() const &&=delete
std::vector< std::uint64_t > emitted_
Definition index_pipeline_detail.h:94
std::uint64_t step(std::uint64_t quanta)
Definition index_pipeline_detail.h:64
P policy_type
Definition index_pipeline_detail.h:40
bool advance_one()
Definition index_pipeline_detail.h:102
std::shared_ptr< blob_type const > pair_type
Definition index_pipeline_detail.h:42
pair_type target_
Definition index_pipeline_detail.h:90
std::span< std::uint64_t const > emitted_suffix_units() const &&=delete
sampling_work const & source_work() const &&=delete
sample_cursor< P, Target > source_
Definition index_pipeline_detail.h:91
profile_sample_encoder< P > source_encoder_
Definition index_pipeline_detail.h:92
pipeline_driver & operator=(pipeline_driver const &)=delete
std::span< std::uint64_t const > consumed_entries() const &noexcept
Definition index_pipeline_detail.h:81
sampling_work const & source_work() const &noexcept
Definition index_pipeline_detail.h:86
std::vector< std::uint64_t > emitted_suffix_units_
Definition index_pipeline_detail.h:96
std::size_t size() const noexcept
Definition index_pipeline_detail.h:62
pipeline_driver(pipeline_driver &&)=default
bool done() const noexcept
Definition index_pipeline_detail.h:57
std::vector< std::uint64_t > consumed_
Definition index_pipeline_detail.h:95
pipeline_driver(pair_type target, std::vector< std::unique_ptr< Stage > > stages)
Definition index_pipeline_detail.h:45
std::uint64_t source_suffix_units() const noexcept
Definition index_pipeline_detail.h:85
bool failed() const noexcept
Definition index_pipeline_detail.h:61
std::span< std::uint64_t const > consumed_entries() const &&=delete
pipeline_driver(pipeline_driver const &)=delete
bool failed_
Definition index_pipeline_detail.h:99
Target blob_type
Definition index_pipeline_detail.h:41
std::uint64_t source_suffix_units_
Definition index_pipeline_detail.h:97
std::span< std::uint64_t const > emitted_samples() const &noexcept
Definition index_pipeline_detail.h:79
Definition sampling.h:186
bool done() const noexcept
Definition sampling.h:195
profile_sample_view< P > peek() const &
Definition sampling.h:197
sampling_work const & counters() const noexcept
Definition sampling.h:224
void advance()
Definition sampling.h:205
Definition sampling.h:167