I have in my .h file this code:
std::mt19937 rng(time(NULL)); // mersenne numbers
int random(int n) {
std::uniform_int_distribution<int> distribution(0, n);
return distribution(rng);
}
but I never call random()
.
When I am profiling the code with gprof, I get:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
99.13 2.28 2.28 1 2.28 2.28 random(int)
What is happening?