Lines Matching +full:power +full:- +full:down
1 /* SPDX-License-Identifier: GPL-2.0 */
14 #define __round_mask(x, y) ((__typeof__(x))((y)-1))
17 * round_up - round up to next specified power of 2
19 * @y: multiple to round up to (must be a power of 2)
21 * Rounds @x up to next multiple of @y (which must be a power of 2).
24 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
27 * round_down - round down to next specified power of 2
29 * @y: multiple to round down to (must be a power of 2)
31 * Rounds @x down to next multiple of @y (which must be a power of 2).
32 * To perform arbitrary rounding down, use rounddown() below.
42 DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
51 * roundup - round up to the next specified multiple
55 * Rounds @x up to next multiple of @y. If @y will always be a power
61 (((x) + (__y - 1)) / __y) * __y; \
65 * rounddown - round down to next specified multiple
67 * @y: multiple to round down to
69 * Rounds @x down to next multiple of @y. If @y will always be a power
75 __x - (__x % (y)); \
89 (((typeof(x))-1) > 0 || \
90 ((typeof(divisor))-1) > 0 || \
93 (((__x) - ((__d) / 2)) / (__d)); \
97 * Same as above but for u64 dividends. divisor must be a 32-bit
124 * abs - return absolute value of an argument
138 (char)({ signed char __x = (x); __x<0?-__x:__x; }), \
144 ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
147 * reciprocal_scale - "scale" a value into range [0, ep_ro)
152 * range [0, @ep_ro), where the upper interval endpoint is right-open.