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

◆ setup_operation_buffer()

template<OperationReadyData T>
static auto MayaFlux::Yantra::OperationHelper::setup_operation_buffer ( T &  input,
std::vector< std::vector< double > > &  working_buffer 
)
inlinestatic

Setup operation buffer from IO or ComputeData type.

Template Parameters
TIO or ComputeData type
Parameters
inputIO container or direct ComputeData
working_bufferBuffer to setup (will be resized)
Returns
Tuple of [working_spans, structure_info]

Definition at line 308 of file OperationHelper.hpp.

309 {
310 auto [data_spans, structure_info] = extract_structured_double(input);
311
312 if (working_buffer.size() != data_spans.size()) {
313 working_buffer.resize(data_spans.size());
314 }
315
316 std::vector<std::span<double>> working_spans(working_buffer.size());
317
318 for (size_t i = 0; i < data_spans.size(); i++) {
319 working_buffer[i].resize(data_spans[i].size());
320 std::ranges::copy(data_spans[i], working_buffer[i].begin());
321 working_spans[i] = std::span<double>(working_buffer[i].data(), working_buffer[i].size());
322 }
323
324 return std::make_tuple(working_spans, structure_info);
325 }
static std::tuple< std::vector< std::span< double > >, DataStructureInfo > extract_structured_double(T &compute_data)
Extract structured double data from IO container or direct ComputeData with automatic container handl...

References extract_structured_double().

Referenced by MayaFlux::Yantra::sort_compute_data_extract(), MayaFlux::Yantra::sort_compute_data_extract(), MayaFlux::Yantra::transform_auto_correlate_fft(), MayaFlux::Yantra::transform_by_energy(), MayaFlux::Yantra::transform_channel_operation(), MayaFlux::Yantra::transform_convolve(), MayaFlux::Yantra::transform_convolve_with_fir(), MayaFlux::Yantra::transform_cross_correlate(), MayaFlux::Yantra::transform_crossfade_regions(), MayaFlux::Yantra::transform_delay(), MayaFlux::Yantra::transform_fade(), MayaFlux::Yantra::transform_linear(), MayaFlux::Yantra::transform_matrix(), MayaFlux::Yantra::transform_matrix_multichannel(), MayaFlux::Yantra::transform_outliers(), MayaFlux::Yantra::transform_pitch_shift(), MayaFlux::Yantra::transform_polynomial(), MayaFlux::Yantra::transform_power(), MayaFlux::Yantra::transform_regions(), MayaFlux::Yantra::transform_slice(), MayaFlux::Yantra::transform_spectral_filter(), MayaFlux::Yantra::transform_spectral_invert(), MayaFlux::Yantra::transform_time_reverse(), MayaFlux::Yantra::transform_time_stretch(), and MayaFlux::Yantra::transform_window().

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