diff options
author | Axel Davy <[email protected]> | 2015-04-26 23:17:45 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-04-29 08:28:10 +0200 |
commit | 64880d073ab21ae1abad0c049ea2d6a1169a3cfa (patch) | |
tree | 3c102d5957de2460a45e6e92ac73d8dad29266b7 /src/util | |
parent | 405c7d75114fadcf744f6bbd5556c86c66ac631b (diff) |
util/macros: Move DIV_ROUND_UP to util/macros.h
Move DIV_ROUND_UP to a shared location accessible everywhere
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/macros.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/macros.h b/src/util/macros.h index 6c7bda7ae01..3b708ed6aa2 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -182,5 +182,7 @@ do { \ #define UNUSED #endif +/** Compute ceiling of integer quotient of A divided by B. */ +#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) #endif /* UTIL_MACROS_H */ |