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

◆ read_float_results()

std::vector< float > MayaFlux::Yantra::read_float_results ( WordPairExecutionContext & context,
size_t count )
inlinenodiscard

Read the float32 results of a ToFloat32 stage recorded on the context.

Reads the shared buffer of the result binding when it has one, otherwise the context's own.

Parameters
contextThe context the stage was recorded on.
countElements the stage converted.

Definition at line 225 of file WordPairMap.hpp.

226{
227 std::vector<float> out(count);
228 if (count == 0) {
229 return out;
230 }
231 if (context.shared_buffer_info(0, 1)) {
232 context.download_shared(0, 1, out.data(), count * sizeof(float));
233 } else {
234 context.download_binding(1, out.data(), count * sizeof(float));
235 }
236 return out;
237}
void download_binding(size_t index, void *dest, size_t byte_size)
Read back a specific binding into a caller-provided destination.
void download_shared(uint32_t set, size_t binding_index, void *dest, size_t byte_size)
std::optional< SharedBufferInfo > shared_buffer_info(uint32_t set, size_t binding_index) const
What the shared buffer at (set, binding_index) declares, or nothing when absent.

References MayaFlux::Yantra::GpuDispatchCore::download_binding(), MayaFlux::Yantra::GpuDispatchCore::download_shared(), and MayaFlux::Yantra::GpuDispatchCore::shared_buffer_info().

Here is the call graph for this function: