fixed_math
FixedMath: A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic (by arturbac)
SG14
A library for Study Group 14 of Working Group 21 (C++) (by WG21-SG14)
fixed_math | SG14 | |
---|---|---|
5 | 7 | |
56 | 489 | |
- | 1.6% | |
7.1 | 1.8 | |
about 2 months ago | about 2 years ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fixed_math
Posts with mentions or reviews of fixed_math.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-27.
-
fixedmath c++17 library
github.com/arturbac/fixed_math
-
I've been developing in C++ on and off for ~5 years, but I can barely read this question... is this normal?
making code constexpr where it possibly can be evaluated at compile time lets You make a lot of checking during compile time, even writing all unit tests at compile time checked without running the code at all ... if it fails to compile it simply doesn't pass unit tests .. https://github.com/arturbac/fixed_math/tree/master/fixed_lib/include/fixedmath/unittests
-
Crashing compilers with garbage is one thing, but here's 85 characters of valid C++20 that crash clang (from trunk back to version 10) with no diagnostic: template<class...>concept c=true;int x=[]<class...T>(T...)->c<T...>auto{return 0;}();
the equation was copied from libreofficemath to kde kdevelop https://github.com/arturbac/fixed_math/commit/04e0df9924a67fe8068f881de6ece3b31f98a649
-
Fixed math header only library with MIT licence
Just add -I to folder fixed_lib/include and #include Usage examples at this moment You can see in compile time unit tests https://github.com/arturbac/fixed_math/blob/master/fixed_lib/include/fixedmath/compile_time_unit_tests.h
SG14
Posts with mentions or reviews of SG14.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-31.
- Callbacks in embedded | heapless environment
-
How to create callback function for publishing hardware events in C++?
There was a proposal for an `inplace_function` that uses static memory. There was a full implementation made. It's not the best solution for this problem though
-
C++20 compile-time functional operators that work on function pointers
There was a proposal for such functionality but I don't know what happened to it. It seems abandoned. There is full implementation in the same repo.
-
`std::function`overhead and alternatives
The only faster alternative that doesn't lose much flexibility would be to roll your own custom version of std::function that has a medium sized std::aligned_storage_t (or just an std::max_align_t aligned array of std::byte or unsigned char) buffer instead of using a dynamic allocation to hold its functor data. (Or use an implementation of the proposed inplace_function such as https://github.com/WG21-SG14/SG14/blob/master/SG14/inplace_function.h )
-
Can anyone point me to a good resource for SG11/14?
There's a repository for SG14 on GitHub here: https://github.com/WG21-SG14/SG14
-
Use UB optimisation with std::function if you know it's bound, and with std::any if you know what type is held
The SG14 inplace_function takes a similar approach to what you suggest. The only minor downside there is that the way it's implemented makes the type unsafe to use across dll boundaries, due to possible mismatching addresses of the default binding. I guess that's not really a consideration for the C++ standard though, and anyway since std::function can allocate then it's inherently unsafe in that scenario anyway.
-
Fixed math header only library with MIT licence
He was trying to standardize his implementation, but I (sadly) don't know what's happened to it since then: https://github.com/WG21-SG14/SG14/blob/master/Docs/Proposals/Fixed_Point_Library_Proposal.md
What are some alternatives?
When comparing fixed_math and SG14 you can also consider the following projects:
cnl - A Compositional Numeric Library for C++
compile-time-init-build - C++ library for composing modular firmware at compile-time.
static-functional - Header-only C++ library providing compile-time functional operators that work with raw function pointers
function2 - Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
rfcs - RFCs for changes to Rust
Folly - An open-source C++ library developed and used at Facebook.
binutils-gdb - Unofficial mirror of sourceware binutils-gdb repository. Updated daily.