Add Rounding to nearest number

This commit is contained in:
Atri Sharma 2018-05-07 23:05:03 +05:30 committed by alexey-milovidov
parent 9b5ecc83ac
commit 22530c38e4
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include <Common/getNumberOfPhysicalCPUCores.h>
#include <thread>
#include <fstream>
#include <math.h>
#if defined(__x86_64__)
@ -27,7 +28,7 @@ unsigned getNumberOfPhysicalCPUCores()
// If a valid value is present
if(allocated_cpus_share_int > -1)
{
unsigned int allocated_cpus = allocated_cpus_share_int / 1000;
unsigned int allocated_cpus = round (allocated_cpus_share_int / 1000);
return allocated_cpus;
}
}