Refac: Make all ops inline instead of static inline #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ops.hppwas originally a C file, but got refactored into CPP implementation to use the templates (which indeed simplified a lot of code)I noticed the functions are still declared with C style
static inline(this leads each TU to own a private copy of that function) which is not desireable here (C's semantics ofinlinediffer with C++). Switching all of them to justinlineto allow linker to share those objects rather making private copies. Although most of the functions are small enough to be get inlined by the compiler anyway but this can help in debugging and will reduce some code bloat (2% on my machine) as we use these ops in multiple C++ TUs (see below)Details
I proposed this earlier and one more time here, Ideally it'll be better to replace all explicit use of SLEEF routines to these ops abstractions (this will require porting the remaining C files C++) but will make the code more extendable.