Add threads to exactInference

This commit is contained in:
2023-07-06 11:59:48 +02:00
parent 0d27ecd253
commit b6c21c21e2
2 changed files with 26 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
#include <iostream>
#include <string>
#include <torch/torch.h>
#include <thread>
#include <getopt.h>
#include "ArffFiles.h"
#include "Network.h"
@@ -228,5 +229,7 @@ int main(int argc, char** argv)
//showCPDS(network);
cout << "Score: " << network.score(Xd, y) << endl;
cout << "PyTorch version: " << TORCH_VERSION << endl;
unsigned int nthreads = std::thread::hardware_concurrency();
cout << "Computer has " << nthreads << " cores." << endl;
return 0;
}