Re: [PATCH v11 06/11] math.h: Add macros for rounding to closest value

2024-05-31 Thread Andy Shevchenko
On Fri, May 31, 2024 at 10:41:36PM +0530, Devarsh Thakkar wrote: > Add below rounding related macros: > > round_closest_up(x, y) : Rounds x to closest multiple of y where y is a > power of 2, with a preference to round up in case two nearest values are > possible. > > round_closest_down(x, y) : R

[PATCH v11 06/11] math.h: Add macros for rounding to closest value

2024-05-31 Thread Devarsh Thakkar
Add below rounding related macros: round_closest_up(x, y) : Rounds x to closest multiple of y where y is a power of 2, with a preference to round up in case two nearest values are possible. round_closest_down(x, y) : Rounds x to closest multiple of y where y is a power of 2, with a preference to