Class AbstractFunction
Defined in File abstract_value.h
Inheritance Relationships
Base Type
public mindspore::abstract::AbstractBase
(Class AbstractBase)
Class Documentation
-
class AbstractFunction : public mindspore::abstract::AbstractBase
The base class for the abstract value of the function node.
Public Functions
-
AbstractFunction() = default
Constructor of AbstractFunction.
-
~AbstractFunction() override = default
Destructor of AbstractFunction.
- virtual MS_DECLARE_PARENT (AbstractFunction, AbstractBase) virtual AbstractFunctionPtr GetUnique()=0
Get the unique AbstractFunction.
If there is exactly one possible function, return it. Otherwise, raise an Exception. Caller should ensure the uniqueness.
- Returns
A pointer to AbstractFunction.
-
inline virtual TypePtr BuildType() const override
Build the type of the abstract.
Note
Use this function to get the actual type, while track type is not enough accurate.
- Returns
A pointer to the Type.
-
inline virtual AbstractBasePtr Clone() const override
Clone an abstract from the abstract.
- Returns
A pointer to the cloned abstract.
-
inline virtual AbstractBasePtr Broaden() const override
Broaden the abstract. It will upgrade the abstract to a higher level.
- Returns
A pointer to the broadened abstract.
-
virtual AbstractFunctionPtr Copy() const = 0
Copy an AbstractFunction.
- Returns
A pointer to the copied abstract.
-
virtual AbstractBasePtr Join(const AbstractBasePtr &other) final
Combine two abstracts. If two abstracts are different, it will broaden the abstract value.
- Parameters
other – [in] The other abstract to be joined.
- Returns
A pointer to the combined abstract.
-
virtual AbstractFunctionPtr Join(const AbstractFunctionPtr &other) = 0
Combine two abstracts. If two abstracts are different, it will broaden the abstract value.
- Parameters
other – [in] The other abstract to be joined.
- Returns
A pointer to the combined abstract.
-
virtual void Visit(std::function<void(const AbstractFuncAtomPtr&)>) const = 0
Handle something with the outer visit function.
-
inline virtual AnfNodePtr tracking_id() const
Get the tracking anf node.
- Returns
A point to the anf node.
-
inline virtual void set_tracking_id(AnfNodePtr)
Set a tracking anf node to the abstract.
-
inline virtual AnalysisContextPtr context() const
Get the context which manages the abstract.
- Returns
A point to the context.
Public Static Functions
-
static AbstractFunctionPtr MakeAbstractFunction(const AbstractFuncAtomPtrList &func_list)
Make a AbstractFuncUnion from a list of AbstractFuncAtom.
- Parameters
func_list – [in] A list of AbstractFuncAtomPtrList.
- Returns
A point to the AbstractFunction.
-
AbstractFunction() = default