logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rte_branch_prediction.h

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                      rte_branch_prediction.h(3)

Detailed Description

       Branch Prediction Helpers in RTE

       Definition in file rte_branch_prediction.h.

Macro Definition Documentation

#definelikely(x)__builtin_expect(!!(x),1)
       Check if a branch is likely to be taken.

       This compiler builtin allows the developer to indicate if a branch is likely to be taken. Example:

       if (likely(x > 1)) do_stuff();

       Definition at line 26 of file rte_branch_prediction.h.

   #defineunlikely(x)__builtin_expect(!!(x),0)
       Check if a branch is unlikely to be taken.

       This compiler builtin allows the developer to indicate if a branch is unlikely to be taken. Example:

       if (unlikely(x<1)) do_stuff();

       Definition at line 43 of file rte_branch_prediction.h.

Name

       rte_branch_prediction.h

Synopsis

Macros
       #define likely(x)   __builtin_expect(!!(x), 1)
       #define unlikely(x)   __builtin_expect(!!(x), 0)

See Also