Lines Matching +full:abs +full:- +full:range
9 #define SHRT_MIN ((s16)(-SHRT_MAX - 1))
11 #define INT_MIN (-INT_MAX - 1)
14 #define LONG_MIN (-LONG_MAX - 1)
17 #define LLONG_MIN (-LLONG_MAX - 1)
25 #define S8_MIN ((s8)(-S8_MAX - 1))
28 #define S16_MIN ((s16)(-S16_MAX - 1))
31 #define S32_MIN ((s32)(-S32_MAX - 1))
34 #define S64_MIN ((s64)(-S64_MAX - 1))
40 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
43 #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
53 #define __round_mask(x, y) ((__typeof__(x))((y)-1))
54 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
57 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
58 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
63 #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d))
71 /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
75 (((x) + (__y - 1)) / __y) * __y; \
81 __x - (__x % (y)); \
94 (((typeof(x))-1) > 0 || \
95 ((typeof(divisor))-1) > 0 || (__x) > 0) ? \
97 (((__x) - ((__d) / 2)) / (__d)); \
114 * upper_32_bits - return bits 32-63 of a number
117 * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
119 * 32-bits.
124 * lower_32_bits - return bits 0-31 of a number
130 * abs() handles unsigned and signed longs, ints, shorts and chars. For all
131 * input types abs() returns a signed long.
132 * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
135 #define abs(x) ({ \ macro
139 ret = (__x < 0) ? -__x : __x; \
142 ret = (__x < 0) ? -__x : __x; \
149 (__x < 0) ? -__x : __x; \
154 * strict type-checking.. See the
173 * min_not_zero - return the minimum that is _not_ zero, unless both are zero
183 * clamp - return a value clamped to a given range with strict typechecking
210 * clamp_t - return a value clamped to a given range using a given type
222 * clamp_val - return a value clamped to a given range using val's type
236 * swap - swap value of @a and @b
242 * container_of - cast a member of a structure out to the containing structure
249 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
250 (type *)( (char *)__mptr - offsetof(type,member) );})