Skip to content

Commit

Permalink
bitset: multiple 'and' and 'or' in a single op
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Guzhva <[email protected]>
  • Loading branch information
alexanderguzhva committed Oct 17, 2024
1 parent 4d08eec commit 42f00db
Show file tree
Hide file tree
Showing 23 changed files with 3,524 additions and 380 deletions.
285 changes: 219 additions & 66 deletions internal/core/src/bitset/bitset.h

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions internal/core/src/bitset/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ namespace bitset {
// this option is only somewhat supported
// #define BITSET_HEADER_ONLY

// `always inline` hint.
// It is introduced to deal with clang's behavior to reuse
// once generated code. But if it is needed to generate
// different machine code for multiple platforms based on
// a single template, then such a behavior is undesired.
// `always inline` is applied for PolicyT methods. It is fine,
// because they are not used directly and are wrapped
// in BitsetBase methods. So, a compiler may decide whether
// to really inline them, but it forces a compiler to
// generate specialized code for every hardward platform.
// todo: MSVC has its own way to define `always inline`.
#define BITSET_ALWAYS_INLINE __attribute__((always_inline))

// a supporting utility
template <class>
inline constexpr bool always_false_v = false;
Expand Down
Loading

0 comments on commit 42f00db

Please sign in to comment.