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

◆ context()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Eigen::MatrixXd>
FftContext & MayaFlux::Yantra::SpectralAnalyzer< InputType, OutputType >::context ( const SpectralAnalyzerConfig & cfg) const
inlineprivate

Definition at line 341 of file SpectralAnalyzer.hpp.

342 {
343 const ContextKey key { cfg.window_size, cfg.band_edges };
344 if (!m_context || !(m_key == key)) {
345 const auto weights = weights_for(cfg);
347 if (m_recording) {
348 m_context->set_recording(m_recording);
349 }
350 m_key = key;
351 }
352 return *m_context;
353 }
std::unique_ptr< FftContext > m_context
std::shared_ptr< GpuDispatchRecorder > m_recording
static std::vector< double > weights_for(const SpectralAnalyzerConfig &cfg)
Rows of weights: total, first moment, then one row per band.
Windowed spectral descriptors of every channel, run on the GPU.

Referenced by MayaFlux::Yantra::SpectralAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::analyze_implementation(), MayaFlux::Yantra::SpectralAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::descriptor_buffer(), and MayaFlux::Yantra::SpectralAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::record().

Here is the caller graph for this function: