| 25 | namespace { |
| 26 | |
| 27 | void SetMinorToMajorLayout(Shape* shape, std::vector<int64> dimensions) { |
| 28 | shape->mutable_layout()->clear_minor_to_major(); |
| 29 | for (auto dimension : dimensions) { |
| 30 | shape->mutable_layout()->add_minor_to_major(dimension); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | TEST(IndexUtilTest, VectorIndexing) { |
| 35 | // Vectors are trivially laid out and the linear index should always be the |