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

◆ stage_native_bytes()

void MayaFlux::Yantra::GpuDispatchCore::stage_native_bytes ( Kakshya::GpuDataFormat format,
const void * data,
size_t byte_size )
protected

Stage raw input bytes of one element type for the next dispatch.

The staging belongs to the next dispatch only: prepare_gpu_inputs consumes it, whether that dispatch succeeds or throws. It is uploaded raw, without conversion, to every INPUT FLOAT32 binding when element is FLOAT32, or every INPUT UINT32 binding when element is UINT32. Such a binding must have no binding data of its own. When native input is staged, it takes the place of channel input, and its element count sets the dispatch size.

Parameters
formatElement format of data, a Kakshya::GpuDataFormat.
dataRaw bytes in that format.
byte_sizeTotal byte count, a multiple of gpu_data_format_bytes(format).

Definition at line 97 of file GpuDispatchCore.cpp.

98{
99 m_native_format = format;
100 m_native_staging_bytes.resize(byte_size);
101 if (byte_size > 0)
102 std::memcpy(m_native_staging_bytes.data(), data, byte_size);
103}
std::vector< uint8_t > m_native_staging_bytes
Native input for the next dispatch, set by stage_native_bytes() or flatten_native_variants_to_staging...
std::optional< Kakshya::GpuDataFormat > m_native_format

References m_native_format, and m_native_staging_bytes.