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