Class Scalar
Defined in File scalar.h
Inheritance Relationships
Base Type
public mindspore::Value
Derived Types
public mindspore::BoolImm
(Class BoolImm)public mindspore::FloatImm
(Class FloatImm)
Class Documentation
-
class Scalar : public mindspore::Value
\beief Scalar defines interface for scalar data.
Subclassed by mindspore::BoolImm, mindspore::FloatImm
Public Functions
-
Scalar() = default
\beief The default constructor for Scalar.
-
inline explicit Scalar(const TypePtr t)
The constructor for Scalar.
- Parameters
t – [in] The type of scalar.
-
~Scalar() override = default
The destructor of Scalar.
- virtual MS_DECLARE_PARENT (Scalar, Value) virtual bool IsZero()=0
Check whether the value of scalar is zero.
- Returns
Return true if the value of scalar is zero ,else return false.
-
virtual bool IsOne() = 0
Check whether the value of scalar is zero.
- Returns
Return true if the value of scalar is zero ,else return false.
-
Scalar() = default