MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ read_argmax()

std::vector< ArgMaxResult > MayaFlux::Yantra::read_argmax ( WordPairExecutionContext & context,
size_t segments )
inlinenodiscard

Read the selections of the segments of the last recorded stage.

Parameters
contextThe context the stage was recorded on.
segmentsNumber of segments of that stage.

Definition at line 124 of file SegmentedArgMax.hpp.

125{
126 const auto words = context.download_words(1, segments * 2U);
127 std::vector<ArgMaxResult> out;
128 out.reserve(segments);
129 for (size_t s = 0; s < segments && 2U * s + 1U < words.size(); ++s) {
130 out.push_back({ .value = words[2U * s],
131 .index = static_cast<uint32_t>(std::bit_cast<uint64_t>(words[2U * s + 1U]) & 0xFFFFFFFFULL) });
132 }
133 return out;
134}
std::vector< double > download_words(size_t binding, size_t count)
Read a binding back as doubles after a recorded stage.

References MayaFlux::Yantra::WordPairExecutionContext::download_words().

Referenced by MayaFlux::Yantra::WaveformAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::measure_chunk().

Here is the call graph for this function:
Here is the caller graph for this function: