lucenaBAL 2.0.1.2
Lucena Build Abstraction Library for C++
Loading...
Searching...
No Matches
Compiler Intrinsics & Built-in Functions

Provides generalized access to compiler intrinsics and built-in functions. More...

LBAL_HINT

In-line hints to the compiler to guide code optimization

These provide compiler hints used to wrap code statements and provide guidance to the compiler regarding intended usage or planned consumption patterns. None of these is guaranteed to have any effect; in the absence of effect, the statement will simply compile normally.

Remarks
(FIXME - bitweeder) This needs a usage example.
#define LBAL_HINT_likely(LBAL_expr_)
 Branch prediction hinting that something is most likely true.
#define LBAL_HINT_unlikely(LBAL_expr_)
 Branch prediction hinting that something is most likely false.

Detailed Description

Provides generalized access to compiler intrinsics and built-in functions.

These are wrappers for intrinsic functions that may not be available on every platform. Where a given function is not available, it may be emulated, or simply replaced with a no-op.

Macro Definition Documentation

◆ LBAL_HINT_likely

#define LBAL_HINT_likely ( LBAL_expr_)

Branch prediction hinting that something is most likely true.

LBAL_expr_ must resolve to a boolean.

This is roughly equivalent to the C++20 [[likely]] attribute, and may resolve to it, if it is available.

◆ LBAL_HINT_unlikely

#define LBAL_HINT_unlikely ( LBAL_expr_)

Branch prediction hinting that something is most likely false.

LBAL_expr_ must resolve to a boolean.

This is roughly equivalent to the C++20 [[unlikely]] attribute, and may resolve to it, if it is available.