| 60 | } |
| 61 | |
| 62 | static std::map<std::string, std::string> load_meta(const std::string & path) { |
| 63 | std::map<std::string, std::string> kv; |
| 64 | std::ifstream f(path); |
| 65 | std::string line; |
| 66 | while (std::getline(f, line)) { |
| 67 | if (line.empty()) { |
| 68 | continue; |
| 69 | } |
| 70 | size_t eq = line.find('='); |
| 71 | if (eq == std::string::npos) { |
| 72 | continue; |
| 73 | } |
| 74 | kv[line.substr(0, eq)] = line.substr(eq + 1); |
| 75 | } |
| 76 | return kv; |
| 77 | } |
| 78 | |
| 79 | static std::vector<tensor_case> tensor_cases_for(const std::string & case_dir) { |
| 80 | std::vector<tensor_case> cases; |