Adding precision selection
This forked branch and PR purpose to add precision selection on PoseLib. i.e, it allowes to use float precision instead of double.
Trivially, it has to tune parameters and make bigger thresholds/tolerances.
If you enabled WITH_FLOAT option on build, then you can use PoseLib float only.
And the results file will have midfix f
or
PoseLibfd.lib on debug case
Also, this PR includes some improvements in benchmark, since there are overflow on runtime accumulation in debug builds. And I'd like to save results automatically.
Good to check file lists:
- CMakeLists.txt
- real_t.h
- SetEnv.cmake
MSVC Benchmark Results
benchmark_results_double_0.000001.csv
benchmark_results_float_0.000001.csv
benchmark_results_float_0.001000.csv
Clang Benchmark Results
benchmark_results_double_0.000001.csv
benchmark_results_float_0.000001.csv
benchmark_results_float_0.001000.csv
Fixes #101
Just minor askment, cmake version 3.10 seems too old, no :)?
Just minor askment, cmake version 3.10 seems too old, no :)?
Do you mean for this:
cmake_minimum_required(VERSION 3.10)
This is minimum requirement; newer versions can be used.
@pablospe I'd think 3.14 seems good to use as minimum, since it supports better generator expression syntax.
Surely if you guys accept it.
Note,
- applied suggestions from @pablospe , but
realinstead ofReal. Sincerealis primitive, I think lower-case name makes sense for it. - separated type header to
real.hand toreal_matrix.hto improve build speed. - Due to poor feature of cmake, my suggestion regarding cmake is abandoned.
Due to poor feature of cmake, my suggestion regarding cmake is abandoned.
Could you expand on this? Not sure to understand about the poor feature of cmake. What did you want to achieve?
- applied suggestions from @pablospe , but
realinstead ofReal. Sincerealis primitive, I think lower-case name makes sense for it.
I feel using Real instead of real is a better option, for the following:
-
Consistency with Type Naming Conventions:
- It is a common convention to capitalize type names to distinguish them from primitive types and variables. This improves code readability and maintainability. See
types.hand we are using all as VectorYYY, MatrixZZZ, etc. - Using
Realaligns with this convention, making it clear that it is a custom type.
- It is a common convention to capitalize type names to distinguish them from primitive types and variables. This improves code readability and maintainability. See
-
Readability and Maintainability:
- Capitalizing type names makes it easier to quickly identify and understand the code. It reduces cognitive load and helps in maintaining a consistent coding style.
-
Industry Standards and Best Practices:
- Refer to industry standards and best practices that recommend capitalizing type names. This can provide authoritative support for the change. For example, the Google C++ Style Guide recommends using capitalized names for types. And we might change to strictly follow Google C++ Style, see this PR
I would recommend changing it to Real (preferrable) or leaving it as real_t.
Due to poor feature of cmake, my suggestion regarding cmake is abandoned.
Could you expand on this? Not sure to understand about the poor feature of cmake. What did you want to achieve?
Sorry for no defail about it.
Since cmake's generator expression doesn't work with set() command of cmake, i.e. only work with partial commands like if().
It may need to increase cmake version too many. But I thought ppl prefer to keep lowest version of utilities, so I'd drop the change.
It may need to increase cmake version too many. But I thought ppl prefer to keep lowest version of utilities, so I'd drop the change.
It would be ok to increase the cmake version, it is fine.
There are some misunderstanding regarding cmake from me. anyway cmake script is simplified.