YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
|
Base class for commutative numerical operators. More...
#include <yc_node_api.hpp>
Public Member Functions | |
virtual int | get_num_operands ()=0 |
Get the number of operands. | |
virtual std::vector< yc_number_node_ptr > | get_operands ()=0 |
Get a list of the operands. | |
virtual void | add_operand (yc_number_node_ptr node)=0 |
Add an operand. | |
Public Member Functions inherited from yask::yc_number_node | |
virtual yc_number_node_ptr | clone_ast () const =0 |
Create a deep copy of AST starting with this node. | |
Public Member Functions inherited from yask::yc_expr_node | |
virtual std::string | format_simple () const =0 |
Create a simple human-readable string. | |
virtual int | get_num_nodes () const =0 |
Count the size of the AST. | |
Base class for commutative numerical operators.
This is used for operators whose arguments can be rearranged mathematically, e.g., add and multiply.
|
pure virtual |
Get the number of operands.
If there is just one operand, the operation itself is moot. If there are more than one operand, the operation applies between them. Example: for an add operator, if the operands are a
, b
, and c
, then the expression is a + b + c
.
|
pure virtual |
Get a list of the operands.
|
pure virtual |
Add an operand.
[in] | node | Top node of AST to add. |