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

◆ validate_config()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Eigen::MatrixXd>
void MayaFlux::Yantra::WindowedKernelAnalyzer< InputType, OutputType >::validate_config ( const WindowedKernelConfig & cfg)
inlinestaticprivate

Definition at line 523 of file WindowedKernelAnalyzer.hpp.

524 {
525 const auto fail = [](std::string_view message) {
528 };
529 if (cfg.kernel.empty() == cfg.shader_path.empty()) {
530 fail("Exactly one of kernel and shader_path must be set");
531 }
532 if (cfg.outputs == 0) {
533 fail("A kernel must write at least one output per window");
534 }
535 if (cfg.window_size == 0 || cfg.hop_size == 0) {
536 fail("Window and hop sizes must be greater than 0");
537 }
538 if (const std::string reason = windowed_kernel_diagnose(cfg.shape()); !reason.empty()) {
539 fail(reason);
540 }
541 }
Runs a caller's compute kernel once per window of every channel.
std::string windowed_kernel_diagnose(const WindowedKernelShape &shape)
Why a shape cannot be used, empty when it can.

Referenced by MayaFlux::Yantra::WindowedKernelAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::WindowedKernelAnalyzer().

Here is the caller graph for this function: