Vcsn  2.3
Be Rational
cassert.hh
Go to the documentation of this file.
1 #pragma once
2 
3 /*-------------------.
4 | likely, unlikely. |
5 `-------------------*/
6 
7 // Instrumentation of conditional values (hand made profiling).
8 //
9 // if (unlikely(condition))
10 // {
11 // // Handle fallback, errors and this will never be executed in a
12 // // normal running process.
13 // }
14 
15 #define likely(Exp) __builtin_expect(!!(Exp), 1)
16 #define unlikely(Exp) __builtin_expect(!!(Exp), 0)