interface ngraph::snippets::Emitter¶
Overview¶
Base class for all target specific code emitters used by generator. More…
#include <emitter.hpp>
template Emitter
{
// construction
Emitter(const std::shared_ptr<ngraph::Node>& n);
Emitter(std::vector<std::pair<std::shared_ptr<Emitter>, RegInfo>>& region);
// methods
virtual void emit_code(
const std::vector<size_t>& in,
const std::vector<size_t>& out,
const std::vector<size_t>& pool = {},
const std::vector<size_t>& gpr = {}
) const = 0;
virtual void emit_data() const;
};
Detailed Documentation¶
Base class for all target specific code emitters used by generator.
Construction¶
Emitter(const std::shared_ptr<ngraph::Node>& n)
Default constructor.
Methods¶
virtual void emit_code(
const std::vector<size_t>& in,
const std::vector<size_t>& out,
const std::vector<size_t>& pool = {},
const std::vector<size_t>& gpr = {}
) const = 0
called by generator to generate code to produce target code for a specific operation
Parameters:
in |
vector of vector argument registers |
out |
vector of vector resulting registers |
pool |
optional vector of free vector registers which might be used inside method |
gpr |
vector of free generam puproce registers which might be used inside method |
Returns:
void
virtual void emit_data() const
called by generator to generate data section, if needed for a specific operation
Returns:
void