ONE - On-device Neural Engine
|
Factory for some kinds of frequently used artifact DOM objects. More...
#include <ArtifactModel.h>
Static Public Member Functions | |
static std::shared_ptr< ArtifactId > | id (const std::string &name) |
static std::shared_ptr< ArtifactLiteral > | lit (const std::string &name) |
static std::shared_ptr< ArtifactVariable > | var (const std::string &type_name, const std::string &var_name, const std::list< std::shared_ptr< ArtifactExpr > > &dimensions={}, const std::list< std::shared_ptr< ArtifactExpr > > &initializers={}) |
Creates a new variable and place it to the block. | |
static std::shared_ptr< ArtifactRef > | ref (std::shared_ptr< ArtifactExpr > ref) |
Creates a 'reference' (like C/C++ '&' address operator do) to the expression. | |
static std::shared_ptr< ArtifactDeref > | deref (std::shared_ptr< ArtifactExpr > ref) |
Creates a 'dereference' (like C/C++ '*' dereference operator do) of the expression. | |
static std::shared_ptr< ArtifactFunctionCall > | call (const std::string &func_name, const std::list< std::shared_ptr< ArtifactExpr > > ¶m_list, std::shared_ptr< ArtifactExpr > on=nullptr, ArtifactCallType call_type=ArtifactCallType::obj) |
Creates a function call. | |
static std::shared_ptr< ArtifactUnaryExpr > | un (ArtifactUnOp op, std::shared_ptr< ArtifactExpr > expr) |
Creates an unary operation expression. | |
static std::shared_ptr< ArtifactBinaryExpr > | bin (ArtifactBinOp op, std::shared_ptr< ArtifactExpr > left, std::shared_ptr< ArtifactExpr > right) |
Creates a binary operation expression. | |
static std::shared_ptr< ArtifactIndex > | ind (std::shared_ptr< ArtifactExpr > expr, std::shared_ptr< ArtifactExpr > ind) |
Creates an array element accessor expression (like C/C++ array[i]). | |
static std::shared_ptr< ArtifactUnaryExpr > | heapNew (std::shared_ptr< ArtifactExpr > expr) |
Creates a heap new operation expression. | |
static std::shared_ptr< ArtifactUnaryExpr > | heapFree (std::shared_ptr< ArtifactExpr > expr) |
Creates a heap free operation expression. | |
Factory for some kinds of frequently used artifact DOM objects.
Definition at line 734 of file ArtifactModel.h.
|
inlinestatic |
Creates a binary operation expression.
op | |
left | |
right |
Definition at line 819 of file ArtifactModel.h.
|
inlinestatic |
Creates a function call.
func_name | - the function name. |
param_list | - the parameters which are used for the call. |
call_on | - optional object on which the function is called (if it is a member function). |
call_type | - (for member functions only) call through: '.', '->', or '::'. |
Definition at line 793 of file ArtifactModel.h.
Referenced by nnc::AclCppOpGenerator::generate(), and TEST().
|
inlinestatic |
Creates a 'dereference' (like C/C++ '*' dereference operator do) of the expression.
ref |
Definition at line 779 of file ArtifactModel.h.
References nnc::ref.
Referenced by TEST().
|
inlinestatic |
Creates a heap free operation expression.
expr |
Definition at line 851 of file ArtifactModel.h.
References nnc::heapFree.
|
inlinestatic |
Creates a heap new operation expression.
expr |
Definition at line 841 of file ArtifactModel.h.
References nnc::heapNew.
|
inlinestatic |
|
inlinestatic |
Creates an array element accessor expression (like C/C++ array[i]).
expr | |
ind |
Definition at line 830 of file ArtifactModel.h.
References ind().
|
inlinestatic |
Definition at line 742 of file ArtifactModel.h.
Referenced by nnc::AclCppOpGenerator::generate(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinestatic |
Creates a 'reference' (like C/C++ '&' address operator do) to the expression.
ref |
Definition at line 769 of file ArtifactModel.h.
References nnc::ref.
Referenced by TEST(), and nnc::AclCppOpGenerator::visit().
|
inlinestatic |
Creates an unary operation expression.
op | |
expr |
Definition at line 806 of file ArtifactModel.h.
|
inlinestatic |
Creates a new variable and place it to the block.
type_name | - the variable type name. |
var_name | - the varibale name. |
dimensions | - optional dimensions, if the declared variable is an array. |
initializer | - optional variable initializer. |
constructors | - optional arguments of the object constructor, if instantiating a class. |
Definition at line 757 of file ArtifactModel.h.