Class AbstractScalar
Defined in File abstract_value.h
Inheritance Relationships
Base Type
public mindspore::abstract::AbstractBase
(Class AbstractBase)
Class Documentation
-
class AbstractScalar : public mindspore::abstract::AbstractBase
Class AbstractScalar describes a scalar’s type and value.
Public Functions
-
inline AbstractScalar()
Constructor of AbstractScalar.
-
inline AbstractScalar(const ValuePtr &value, const TypePtr &type)
Constructor of AbstractScalar.
- Parameters
value – [in] The real value of an anf node.
type – [in] The type of an anf node.
-
inline explicit AbstractScalar(const ValuePtr &value)
Constructor of AbstractScalar.
- Parameters
value – [in] The real value of an anf node.
-
inline explicit AbstractScalar(int value)
Constructor of AbstractScalar, inited with an int number.
- Parameters
value – [in] An int number.
-
inline explicit AbstractScalar(int64_t value)
Constructor of AbstractScalar, inited with an int64 number.
- Parameters
value – [in] An int64 number.
-
inline explicit AbstractScalar(float value)
Constructor of AbstractScalar, inited with a float number.
- Parameters
value – [in] A float number.
-
inline explicit AbstractScalar(double value)
Constructor of AbstractScalar, inited with a double number.
- Parameters
value – [in] A double number.
-
inline explicit AbstractScalar(bool value)
Constructor of AbstractScalar, inited with a bool.
- Parameters
value – [in] A boolean variable.
-
inline explicit AbstractScalar(const std::string &value)
Constructor of AbstractScalar, inited with a string.
- Parameters
value – [in] A string.
-
inline explicit AbstractScalar(const TypePtr &type)
Constructor of AbstractScalar, inited with a type.
- Parameters
type – [in] The type.
-
~AbstractScalar() override = default
Destructor of AbstractScalar.
- virtual MS_DECLARE_PARENT(AbstractScalar, AbstractBase) std AbstractBasePtr Join (const AbstractBasePtr &other) override
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.
-
inline AbstractScalar()