Class AbstractUndetermined

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class AbstractUndetermined : public mindspore::abstract::AbstractBase

Class AbstractUndetermined describes the abstract if anf node has unknown shape, type or value.

Subclassed by mindspore::abstract::AbstractCOOTensor, mindspore::abstract::AbstractCSRTensor, mindspore::abstract::AbstractRowTensor, mindspore::abstract::AbstractTensor

Public Functions

inline AbstractUndetermined()

Constructor of AbstractUndetermined.

Shape and type are all unknown.

inline explicit AbstractUndetermined(const AbstractBasePtr &element, const BaseShapePtr &shape = std::make_shared<Shape>())

Constructor of AbstractUndetermined.

Only element, value and shape track are valid member, type track are unknown.

Parameters
  • element[in] The abstract which is undetermined.

  • shape[in] The dimension of value.

inline AbstractUndetermined(const TypePtr &element_type, const ShapeVector &shape)

Constructor of AbstractUndetermined.

Parameters
  • element_type[in] A type of the undetermined abstract.

  • shape[in] A vector of shape.

inline explicit AbstractUndetermined(const TypePtr &element_type, const BaseShapePtr &shape = std::make_shared<Shape>())

Constructor of AbstractUndetermined.

Parameters
  • element_type[in] A type of the undetermined abstract.

  • shape[in] A shape of the undetermined abstract.

~AbstractUndetermined() override = default

Destructor of AbstractUndetermined.

inline virtual AbstractBasePtr Clone() const override

Clone an abstract from the abstract.

Returns

A pointer to the cloned abstract.

inline AbstractBasePtr element() const

Get the element, which is the tracked undetermined abstract.

Returns

A pointer to the bind abstract, which is undetermined.

ShapePtr shape() const

Get the shape of the undetermined abstract.

Returns

A pointer to the shape.

virtual void set_shape(const BaseShapePtr &shape) override

Set the shape for the AbstractBase.

Parameters

value[in] The shape of an anf node.