Lines Matching +full:hi +full:- +full:z

1 /* SPDX-License-Identifier: GPL-2.0 */
8 * - avoid multiple evaluations of the arguments (so side-effects like
9 * "x++" happen only once) when non-constant.
10 * - perform strict type-checking (to generate warnings instead of
13 * - retain result as a constant expressions when called with only
23 * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
47 * min - return minimum of two values of the same or compatible types
54 * max - return maximum of two values of the same or compatible types
61 * min3 - return minimum of three values
64 * @z: third value
66 #define min3(x, y, z) min((typeof(x))min(x, y), z) argument
69 * max3 - return maximum of three values
72 * @z: third value
74 #define max3(x, y, z) max((typeof(x))max(x, y), z) argument
77 * min_not_zero - return the minimum that is _not_ zero, unless both are zero
87 * clamp - return a value clamped to a given range with strict typechecking
90 * @hi: highest allowable value
92 * This macro does strict typechecking of @lo/@hi to make sure they are of the
95 #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) argument
105 * min_t - return minimum of two values, using the specified type
113 * max_t - return maximum of two values, using the specified type
121 * clamp_t - return a value clamped to a given range using a given type
125 * @hi: maximum allowable value
130 #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) argument
133 * clamp_val - return a value clamped to a given range using val's type
136 * @hi: maximum allowable value
140 * type and @lo and @hi are literals that will otherwise be assigned a signed
143 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) argument
146 * swap - swap values of @a and @b