Lines Matching full:dividend

17  * @dividend: unsigned 64bit dividend
21 * Return: sets ``*remainder``, then returns dividend / divisor
26 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
28 *remainder = dividend % divisor; in div_u64_rem()
29 return dividend / divisor; in div_u64_rem()
34 * @dividend: signed 64bit dividend
38 * Return: sets ``*remainder``, then returns dividend / divisor
40 static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) in div_s64_rem() argument
42 *remainder = dividend % divisor; in div_s64_rem()
43 return dividend / divisor; in div_s64_rem()
48 * @dividend: unsigned 64bit dividend
52 * Return: sets ``*remainder``, then returns dividend / divisor
54 static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) in div64_u64_rem() argument
56 *remainder = dividend % divisor; in div64_u64_rem()
57 return dividend / divisor; in div64_u64_rem()
62 * @dividend: unsigned 64bit dividend
65 * Return: dividend / divisor
67 static inline u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
69 return dividend / divisor; in div64_u64()
74 * @dividend: signed 64bit dividend
77 * Return: dividend / divisor
79 static inline s64 div64_s64(s64 dividend, s64 divisor) in div64_s64() argument
81 return dividend / divisor; in div64_s64()
90 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
92 *remainder = do_div(dividend, divisor); in div_u64_rem()
93 return dividend; in div_u64_rem()
98 extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
102 extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder);
106 extern u64 div64_u64(u64 dividend, u64 divisor);
110 extern s64 div64_s64(s64 dividend, s64 divisor);
117 * @dividend: unsigned 64bit dividend
124 * Return: dividend / divisor
127 static inline u64 div_u64(u64 dividend, u32 divisor) in div_u64() argument
130 return div_u64_rem(dividend, divisor, &remainder); in div_u64()
136 * @dividend: signed 64bit dividend
139 * Return: dividend / divisor
142 static inline s64 div_s64(s64 dividend, s32 divisor) in div_s64() argument
145 return div_s64_rem(dividend, divisor, &remainder); in div_s64()
149 u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
289 * @ll: unsigned 64bit dividend
292 * Divide unsigned 64bit dividend by unsigned 64bit divisor
295 * Return: dividend / divisor rounded up
302 * @ll: unsigned 64bit dividend
305 * Divide unsigned 64bit dividend by unsigned 32bit divisor
308 * Return: dividend / divisor rounded up
315 * @dividend: unsigned 64bit dividend
318 * Divide unsigned 64bit dividend by unsigned 64bit divisor
321 * Return: dividend / divisor rounded to nearest integer
323 #define DIV64_U64_ROUND_CLOSEST(dividend, divisor) \ argument
324 ({ u64 _tmp = (divisor); div64_u64((dividend) + _tmp / 2, _tmp); })
328 * @dividend: unsigned 64bit dividend
331 * Divide unsigned 64bit dividend by unsigned 32bit divisor
334 * Return: dividend / divisor rounded to nearest integer
336 #define DIV_U64_ROUND_CLOSEST(dividend, divisor) \ argument
337 ({ u32 _tmp = (divisor); div_u64((u64)(dividend) + _tmp / 2, _tmp); })
341 * @dividend: signed 64bit dividend
344 * Divide signed 64bit dividend by signed 32bit divisor
347 * Return: dividend / divisor rounded to nearest integer
349 #define DIV_S64_ROUND_CLOSEST(dividend, divisor)( \ argument
351 s64 __x = (dividend); \