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

◆ record_real()

void MayaFlux::Yantra::FftContext::record_real ( std::span< const double > real,
const SegmentGeometry & geometry,
std::span< const double > window = {} )
inline

Record the transform of windows of a real signal without waiting for it.

The context needs a recording (set_recording), which the dispatch appends to. The result stays on the device, in the result binding: make it a shared buffer with ensure_shared_buffer(0, result_binding, windows * values_per_window(), VEC2_U32) before this call and a consumer on the same recording reads it in place with import_shared.

Parameters
realSamples the windows index into.
geometryWindow length, stride, first offset and count, in samples.
windowCoefficients applied to each window, points of them. Empty is rectangular.

Definition at line 135 of file FftContext.hpp.

135 {})
136 {
137 if (geometry.count == 0) {
138 return;
139 }
140 std::vector<double> interleaved(real.size() * 2, 0.0);
141 for (size_t i = 0; i < real.size(); ++i) {
142 interleaved[2 * i] = real[i];
143 }
144 stage(interleaved, geometry, window);
145 static_cast<void>(dispatch_async(Datum<std::vector<Kakshya::DataVariant>> {}));
146 }
void stage(std::span< const double > interleaved, const SegmentGeometry &geometry, std::span< const double > window={})
Stage input, window and geometry for the next dispatch without running it.
Portal::Graphics::FenceID dispatch_async(const input_type &input)
Dispatch asynchronously and return a fence for polling.