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 <alexanderguzhva@gmail.com>
  • Loading branch information
alexanderguzhva committed May 24, 2024
1 parent b391781 commit dbe3e7d
Show file tree
Hide file tree
Showing 23 changed files with 2,867 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 dbe3e7d

Please sign in to comment.