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

◆ segmented_argmax_spec()

Portal::Graphics::ShaderSpec MayaFlux::Yantra::segmented_argmax_spec ( uint32_t workgroup = 256)
inlinenodiscard

The spec of a SegmentedArgMax kernel.

Segment s covers length elements from offset + s * stride. Values compare by the library order key, where -0.0 equals +0.0, with every NaN smaller than any other value, so a NaN is never selected. Of equal values the lowest index wins. Bindings: values 0, result 1.

Parameters
workgroupInvocations per segment. A power of two from 2 to 1024.

Definition at line 45 of file SegmentedArgMax.hpp.

46{
50 .ssbo("values", BindingDirection::Input, Kakshya::GpuDataFormat::VEC2_U32)
51 .ssbo("result", BindingDirection::Output, Kakshya::GpuDataFormat::VEC2_U32)
55 .workgroup(workgroup)
56 .build();
57}
ShaderSpec build()
Finalise and return the ShaderSpec.
Assemble & pc(std::string name, Kakshya::GpuDataFormat format)
Declare a push constant field with explicit format.
Assemble & ssbo(std::string name, BindingDirection direction, Kakshya::GpuDataFormat format, Kakshya::DataModality modality=Kakshya::DataModality::SCALAR_F32)
Declare an SSBO binding.
Assemble & workgroup(uint32_t x, uint32_t y=1, uint32_t z=1)
Override workgroup size.
Assemble & tmpl(KernelTemplate t)
Set the kernel template.
Fluent assembler producing a ShaderSpec.
@ VEC2_U32
glm::uvec2: a 64-bit value as low word (x) and high word (y), not a sampled image format
@ SegmentedArgMax
The first maximum of each segment of word-pair doubles, one workgroup per segment.
BindingDirection
Data flow direction for a shader binding slot.

References MayaFlux::Portal::Graphics::ShaderSpec::Assemble::build(), MayaFlux::Portal::Graphics::ShaderSpec::Assemble::pc(), MayaFlux::Portal::Graphics::SegmentedArgMax, MayaFlux::Portal::Graphics::ShaderSpec::Assemble::ssbo(), MayaFlux::Portal::Graphics::ShaderSpec::Assemble::tmpl(), MayaFlux::Kakshya::UINT32, MayaFlux::Kakshya::VEC2_U32, and MayaFlux::Portal::Graphics::ShaderSpec::Assemble::workgroup().

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

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