SetDim

Description

Sets dimension idx in Shape to value.

Prototype

graphStatus SetDim(size_t idx, int64_t value)

Parameters

Parameter

Input/Output

Description

idx

Input

Dimension index of Shape, which starts from 0.

value

Input

Value to be set.

Returns

graphStatus type. GRAPH_SUCCESS on success; GRAPH_FAILED on failure.

Exception Handling

None.

Restrictions

Before using the SetDim API, you can only use Shape(const std::vector<int64_t>& dims) to construct shape objects. If Shape() is used to construct a shape object, a failure code is returned by the call to SetDim.