Class AbstractScalar

Inheritance Relationships

Base Type

Class Documentation

class AbstractScalar : public mindspore::api::AbstractBase

AbstractScalar describes a scalar’s type and value.

Public Functions

AbstractScalar(const ValuePtr &value, const TypePtr &type)

Constructs an AbstractScalar with the given value and type.

Parameters
  • value[in] The value.

  • type[in] The type.

explicit AbstractScalar(const TypePtr &type)

Constructs an AbstractScalar with the given type.

Parameters

type[in] The type.

explicit AbstractScalar(const ValuePtr &value)

Constructs an AbstractScalar with the given value.

Parameters

value[in] The value.

explicit AbstractScalar(int64_t value)

Constructs an AbstractScalar with an int64 value.

Parameters

value[in] The int64 value.

explicit AbstractScalar(float value)

Constructs an AbstractScalar with a float value.

Parameters

value[in] The float value.

explicit AbstractScalar(bool value)

Constructs an AbstractScalar with a bool value.

Parameters

value[in] The boolean value.

explicit AbstractScalar(const std::string &value)

Constructs an AbstractScalar with a string value.

Parameters

value[in] The string value.