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

Function IsContiguous

oneflow/core/common/tensor_meta.cpp:164–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164bool IsContiguous(const Shape& shape, const Stride& stride) {
165 if (!shape.is_initialized()) { return true; }
166 return IsContiguous(ShapeView(shape), stride);
167}
168
169bool IsContiguous(const ShapeView& shape_view, const Stride& stride) {
170 if (shape_view.NumAxes() < 1 || shape_view.elem_cnt() <= 1) { return true; }

Callers 3

is_contiguousMethod · 0.70
is_contiguousMethod · 0.70
ComputeMethod · 0.50

Calls 6

ShapeViewClass · 0.70
is_initializedMethod · 0.45
NumAxesMethod · 0.45
elem_cntMethod · 0.45
AtMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected