MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ShiftNegativeAxis

Function ShiftNegativeAxis

oneflow/core/common/shape.cpp:138–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138int64_t ShiftNegativeAxis(int64_t axis, const int64_t num_axes) {
139 if (axis < 0) { axis += num_axes; }
140 CHECK_GE(axis, 0);
141 CHECK_LT(axis, num_axes);
142 return axis;
143}
144
145Shape::Shape(const DimVector& dim_vec) : DimVector(dim_vec), is_initialized_(true) {}
146Shape::Shape(DimVector&& dim_vec) : DimVector(std::move(dim_vec)), is_initialized_(true) {}

Callers 4

GetRegularAxesMethod · 0.85
CreateReducedShapeFunction · 0.85
ShiftNegativeAxisVecMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected