Skip to content

Commit

Permalink
Add functionality to export small net
Browse files Browse the repository at this point in the history
Usage
```
export_net <filenameBigNet> <filenameSmallNet>
```

closes #5133

No functional change
  • Loading branch information
Disservin committed Mar 26, 2024
1 parent 5001d49 commit 7998570
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/uci.cpp
Expand Up @@ -159,11 +159,16 @@ void UCI::loop() {
sync_cout << compiler_info() << sync_endl;
else if (token == "export_net")
{
std::optional<std::string> filename;
std::string f;
if (is >> std::skipws >> f)
filename = f;
networks.big.save(filename);
std::pair<std::optional<std::string>, std::string> files[2];

if (is >> std::skipws >> files[0].second)
files[0].first = files[0].second;

if (is >> std::skipws >> files[1].second)
files[1].first = files[1].second;

networks.big.save(files[0].first);
networks.small.save(files[1].first);
}
else if (token == "--help" || token == "help" || token == "--license" || token == "license")
sync_cout
Expand Down

0 comments on commit 7998570

Please sign in to comment.