| 44 | } |
| 45 | |
| 46 | static inline void AssertCOOIndex(const std::shared_ptr<Tensor>& sidx, const int64_t nth, |
| 47 | const std::vector<int64_t>& expected_values) { |
| 48 | int64_t n = static_cast<int64_t>(expected_values.size()); |
| 49 | for (int64_t i = 0; i < n; ++i) { |
| 50 | ASSERT_EQ(expected_values[i], sidx->Value<Int64Type>({nth, i})); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | //----------------------------------------------------------------------------- |
| 55 | // SparseCOOIndex |