目录

SetDim

Function Description

Sets dimension idx in Shape to value.

Function Prototype

graphStatus SetDim(size_t idx, int64_t value);

Parameters

Parameter Input/Output Description
idx Input Dimension index in a shape. The index starts from 0.
value Input Value to be set.

Return Value

Type Description
graphStatus Returns GRAPH_SUCCESS upon success. Otherwise, GRAPH_FAILED is returned.

Exception Handling

None

Restrictions

Before using the SetDim API, you can only use Shape(const std::vector[/topic/body/section/p/b/int64_t {""}) & dims) (int64_t] to construct shape objects. If Shape () is used to construct a shape object, a failure message is returned when the SetDim API is called.