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.
38 * DIV_ROUND_UP_POW2 - divide and round up
40 * @d: denominator (must be a power of 2)
42 * Divides @n by @d and rounds up to next multiple of @d (which must be a power
47 ((n) / (d) + !!((n) & ((d) - 1)))
55 DIV_ROUND_DOWN_ULL((unsigned long long)(ll) + (d) - 1, (d))
64 * roundup - round up to the next specified multiple
68 * Rounds @x up to next multiple of @y. If @y will always be a power
74 (((x) + (__y - 1)) / __y) * __y; \
78 * rounddown - round down to next specified multiple
80 * @y: multiple to round down to
82 * Rounds @x down to next multiple of @y. If @y will always be a power
88 __x - (__x % (y)); \
102 (((typeof(x))-1) > 0 || \
103 ((typeof(divisor))-1) > 0 || \
106 (((__x) - ((__d) / 2)) / (__d)); \
110 * Same as above but for u64 dividends. divisor must be a 32-bit
150 * abs - return absolute value of an argument
164 (char)({ signed char __x = (x); __x<0?-__x:__x; }), \
170 ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
173 * abs_diff - return absolute value of the difference between the arguments
188 __a > __b ? (__a - __b) : (__b - __a); \
192 * reciprocal_scale - "scale" a value into range [0, ep_ro)
197 * range [0, @ep_ro), where the upper interval endpoint is right-open.