diff --git a/test.cpp b/test.cpp index 402cd523..a3250a87 100644 --- a/test.cpp +++ b/test.cpp @@ -42,6 +42,10 @@ #include #endif +#ifdef _OPENMP +# include +#endif + #ifdef __BORLANDC__ #pragma comment(lib, "cryptlib_bds.lib") #pragma comment(lib, "ws2_32.lib") @@ -769,9 +773,21 @@ bool Validate(int alg, bool thorough, const char *seedInput) std::string seed = seedInput ? std::string(seedInput) : IntToString(time(NULL)); seed.resize(16); - cout << "Using seed: " << seed << endl << endl; + cout << "Using seed: " << seed << endl; s_globalRNG.SetKeyWithIV((byte *)seed.data(), 16, (byte *)seed.data()); +#ifdef _OPENMP + int tc = 0; + #pragma omp parallel + { + tc = omp_get_num_threads(); + } + + cout << "Using " << tc << " OMP " << (tc == 1 ? "thread" : "threads") << endl; +#endif + + cout << endl; + switch (alg) { case 0: result = ValidateAll(thorough); break;