Lines Matching +full:power +full:- +full:down
1 /* SPDX-License-Identifier: GPL-2.0 */
15 #define __round_mask(x, y) ((__typeof__(x))((y)-1))
18 * round_up - round up to next specified power of 2
20 * @y: multiple to round up to (must be a power of 2)
22 * Rounds @x up to next multiple of @y (which must be a power of 2).
25 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
28 * round_down - round down to next specified power of 2
30 * @y: multiple to round down to (must be a power of 2)
32 * Rounds @x down to next multiple of @y (which must be a power of 2).
33 * To perform arbitrary rounding down, use rounddown() below.
43 DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
52 * roundup - round up to the next specified multiple
56 * Rounds @x up to next multiple of @y. If @y will always be a power
62 (((x) + (__y - 1)) / __y) * __y; \
66 * rounddown - round down to next specified multiple
68 * @y: multiple to round down to
70 * Rounds @x down to next multiple of @y. If @y will always be a power
76 __x - (__x % (y)); \
90 (((typeof(x))-1) > 0 || \
91 ((typeof(divisor))-1) > 0 || \
94 (((__x) - ((__d) / 2)) / (__d)); \
98 * Same as above but for u64 dividends. divisor must be a 32-bit
138 * abs - return absolute value of an argument
152 (char)({ signed char __x = (x); __x<0?-__x:__x; }), \
158 ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
161 * abs_diff - return absolute value of the difference between the arguments
176 __a > __b ? (__a - __b) : (__b - __a); \
180 * reciprocal_scale - "scale" a value into range [0, ep_ro)
185 * range [0, @ep_ro), where the upper interval endpoint is right-open.