Skip to content

Commit

Permalink
Add GTL_ASSUME macro (unused for now).
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed Jun 4, 2023
1 parent 86001d1 commit 4caee2d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/gtl/gtl_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@
#define GTL_ATTRIBUTE_NO_UNIQUE_ADDRESS
#endif

#if GTL_HAVE_ATTRIBUTE(assume)
#define GTL_ASSUME(expr) [[assume(expr)]]
#elif defined(__clang__)
#define GTL_ASSUME(expr) __builtin_assume(expr)
#elif defined(_MSC_VER) || defined(__ICC))
#define GTL_ASSUME(expr) __assume(expr)
#else
#define GTL_ASSUME(expr)
#endif

// ----------------------------------------------------------------------
// Figure out SSE support
// ----------------------------------------------------------------------
Expand Down

0 comments on commit 4caee2d

Please sign in to comment.