| 98 | |
| 99 | template<class T1, class T2> |
| 100 | const std::pair<std::vector<T1>, std::vector<T2>> Unzip(const of::HashMap<T1, T2>& hash_map) { |
| 101 | std::vector<T1> vec1; |
| 102 | std::vector<T2> vec2; |
| 103 | for (const auto& entry : hash_map) { |
| 104 | vec1.emplace_back(entry.first); |
| 105 | vec2.emplace_back(entry.second); |
| 106 | } |
| 107 | return std::make_pair(vec1, vec2); |
| 108 | } |
| 109 | |
| 110 | Shape OfShapeToOfApiShape(const of::Shape& of_shape) { |
| 111 | std::vector<int64_t> dims(of_shape.dim_vec().begin(), of_shape.dim_vec().end()); |
no test coverage detected