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>
ShaderExecutionContext & MayaFlux::Yantra::WindowedKernelAnalyzer< InputType, OutputType >::context ( const WindowedKernelConfig & cfg) const
inlineprivate

Definition at line 543 of file WindowedKernelAnalyzer.hpp.

544 {
545 const auto shape = cfg.shape();
546 const std::string key = (cfg.kernel.empty() ? "file:" + cfg.shader_path : "body:" + cfg.kernel)
547 + "#" + std::to_string(shape.lanes) + "x" + std::to_string(shape.inputs);
548 if (!m_context || m_key != key) {
549 GpuComputeConfig gpu = cfg.kernel.empty()
552 if (gpu.shader_id == Portal::Graphics::INVALID_SHADER && gpu.shader_path.empty()) {
553 error<std::runtime_error>(Journal::Component::Yantra, Journal::Context::ComputeMatrix,
554 std::source_location::current(), "The kernel did not compile; the shader log has the compiler's message");
555 }
558 m_key = key;
559 }
560 return *m_context;
561 }
std::unique_ptr< ShaderExecutionContext<> > m_context
Runs a caller's compute kernel once per window of every channel.
GpuComputeConfig windowed_kernel_file_config(std::string path, const WindowedKernelShape &shape={})
Config of a .comp file that follows the layout.

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

Here is the caller graph for this function: