Tenncor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
iconverter.hpp
Go to the documentation of this file.
1 
9 extern "C" {
10 #include "opt/parse/def.h"
11 }
12 
13 #include "opt/candidate.hpp"
14 
15 #ifndef OPT_ICONVERTER_HPP
16 #define OPT_ICONVERTER_HPP
17 
18 namespace opt
19 {
20 
22 struct iConverter
23 {
24  virtual ~iConverter (void) = default;
25 
28  virtual teq::TensptrT build (
29  const ContexT& ctx, teq::Shape outshape) const = 0;
30 
32  virtual std::string to_string (void) const = 0;
33 };
34 
36 using ConvptrT = std::shared_ptr<iConverter>;
37 
38 }
39 
40 #endif // OPT_ICONVERTER_HPP
Definition: shape.hpp:62
virtual ~iConverter(void)=default
Definition: candidate.hpp:19
virtual std::string to_string(void) const =0
std::map< std::string, CtxValT > ContexT
Map of rule graph leaf identifiers to corresponding matches.
Definition: candidate.hpp:26
std::shared_ptr< iConverter > ConvptrT
Smart pointer of converter.
Definition: iconverter.hpp:36
std::shared_ptr< iTensor > TensptrT
Tensor smart pointer.
Definition: itensor.hpp:51
virtual teq::TensptrT build(const ContexT &ctx, teq::Shape outshape) const =0
Converter interface for building TEQ graphs.
Definition: iconverter.hpp:22