Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROperator.hxx
Go to the documentation of this file.
1#ifndef TMVA_SOFIE_ROPERATOR
2#define TMVA_SOFIE_ROPERATOR
3
4#include <vector>
5#include <memory>
6
8//#include "RModel.hxx"
9
10
11
12namespace TMVA{
13namespace Experimental{
14namespace SOFIE{
15
16class RModel;
17
19
20
21public:
22 virtual std::vector<std::string> GetBlasRoutines() { return {}; }
23 virtual std::vector<std::string> GetStdLibs() { return {}; }
24 virtual std::vector<std::vector<size_t>> ShapeInference(std::vector<std::vector<size_t>>) = 0;
25 virtual std::vector<ETensorType> TypeInference(std::vector<ETensorType>) = 0;
26 virtual void Initialize(RModel&) = 0;
27 virtual std::string Generate(std::string OpName) = 0; //expect unique opName for each operator within the same RModel
28 // generate initialization code
29 virtual std::string GenerateInitCode() { return "";}
30 // generate session data members specific to operator
31 virtual std::string GenerateSessionMembersCode(std::string /*opName*/) { return ""; }
32 virtual std::string Header() { return "";}
33
34
35 //virtual void Forward_reference() = 0;
36 //virtual void Forward_blas() = 0;
37 virtual ~ROperator(){}
38
39protected:
40
41 const std::string SP = " "; ///< space used to correctly indent the generated C++ code
42 bool fUseSession = false; ///< flag to identify if using the session class
43};
44
45
46
47}//SOFIE
48}//Experimental
49}//TMVA
50
51
52#endif //TMVA_SOFIE_OPERATOR
virtual std::vector< std::string > GetBlasRoutines()
Definition ROperator.hxx:22
virtual void Initialize(RModel &)=0
virtual std::string GenerateInitCode()
Definition ROperator.hxx:29
const std::string SP
space used to correctly indent the generated C++ code
Definition ROperator.hxx:41
virtual std::vector< ETensorType > TypeInference(std::vector< ETensorType >)=0
virtual std::string GenerateSessionMembersCode(std::string)
Definition ROperator.hxx:31
virtual std::vector< std::vector< size_t > > ShapeInference(std::vector< std::vector< size_t > >)=0
bool fUseSession
flag to identify if using the session class
Definition ROperator.hxx:42
virtual std::string Generate(std::string OpName)=0
virtual std::vector< std::string > GetStdLibs()
Definition ROperator.hxx:23
create variable transformations