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

◆ segmented_argmax_stage() [2/2]

DependencyStage MayaFlux::Yantra::segmented_argmax_stage ( WordPairExecutionContext & context,
const GpuComputeConfig & config,
std::span< const double > values,
const SegmentGeometry & geometry )
inlinenodiscard

The stage that selects the largest value of every segment of a host sequence.

Parameters
contextContext built with config.
configConfig of the spec the context was built from.
valuesDoubles the segments index into.
geometrySegment length, stride, first offset and count. Every segment must lie inside values.

Definition at line 107 of file SegmentedArgMax.hpp.

110{
111 auto stage = segmented_argmax_stage(context, config, geometry);
112 stage.stage_fn = [&context, values, resident = std::move(stage.stage_fn)](GpuDispatchCore& core) {
113 context.stage_words(0, values);
114 resident(core);
115 };
116 return stage;
117}
Non-template base that owns all type-independent GPU dispatch logic.
void stage_words(uint32_t binding, std::span< const double > values, size_t padded_count=0, bool complement=false)
Encode values and stage them as the data of a binding.
DependencyStage segmented_argmax_stage(WordPairExecutionContext &context, const GpuComputeConfig &config, const SegmentGeometry &geometry)
The stage that selects the largest value of every segment of values already on the device.

References segmented_argmax_stage(), and MayaFlux::Yantra::WordPairExecutionContext::stage_words().

Here is the call graph for this function: