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 May 24, 2024
1 parent b391781 commit 14c3828
Show file tree
Hide file tree
Showing 17 changed files with 2,241 additions and 353 deletions.
268 changes: 202 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 14c3828

Please sign in to comment.