coin-or / qpOASES

Open-source C++ implementation of the recently proposed online active set strategy
GNU Lesser General Public License v2.1
360 stars 121 forks source link

real_t getCPUtime() does not have enough accuracy when enabling __USE_SINGLE_PRECISION__ #115

Open hmojtaba opened 3 years ago

hmojtaba commented 3 years ago

real_t type is float when we enable USE_SINGLE_PRECISION. and then all usages of cputime won't work because float doeas not have enough accuracy for this purpose.

for my own project I changed any usage related to cputime to double instead of real_t no matter if USE_SINGLE_PRECISION was enabled or not.