Match thread count to machine capability

This commit is contained in:
Martin Kroeker
2020-04-10 22:06:44 +02:00
committed by GitHub
parent 3a6d51c2fd
commit 66f89c0aaf
2 changed files with 9 additions and 1 deletions
+4
View File
@@ -15,6 +15,10 @@ int main(int argc, char* argv[]){
blasint randomMatSize = 1024; //dimension of the random square matrices and vectors being used
uint32_t numConcurrentThreads = 52; //number of concurrent calls of the functions being tested
uint32_t numTestRounds = 16; //number of testing rounds before success exit
uint32_t maxHwThreads = omp_get_max_threads();
if (maxHwThreads < 52)
numConcurrentThreads = maxHwThreads -4;
if (argc > 4){
std::cout<<"ERROR: too many arguments for thread safety tester"<<std::endl;