| /kernel/linux/linux-6.6/include/linux/ |
| H A D | minmax.h | 11 * min()/max()/clamp() macros must accomplish three things: 69 "clamp() low limit " #lo " greater than high limit " #hi); \ 70 static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \ 71 static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \ 138 * clamp - return a value clamped to a given range with strict typechecking 146 #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) macro 152 * Or not use min/max/clamp at all, of course.
|
| /kernel/linux/linux-6.6/drivers/clk/meson/ |
| H A D | sclk-div.c | 46 return clamp(div, 2, maxdiv); in sclk_div_getdiv()
|
| /kernel/linux/linux-6.6/net/handshake/ |
| H A D | netlink.c | 186 hn->hn_pending_max = clamp(tmp, 3UL, 50UL); in handshake_net_init()
|
| /third_party/mesa3d/src/compiler/glsl/ |
| H A D | ir_rvalue_visitor.cpp | 56 handle_rvalue(&ir->clamp); in rvalue_visit()
|
| /third_party/mesa3d/src/gallium/drivers/r600/ |
| H A D | r600_asm.h | 48 unsigned clamp; member
|
| /third_party/skia/third_party/externals/angle2/src/libANGLE/ |
| H A D | Context_gl_3_autogen.h | 15 void clampColor(GLenum target, GLenum clamp); \
|
| /third_party/skia/third_party/externals/swiftshader/src/Renderer/ |
| H A D | SetupProcessor.cpp | 244 routineCache = new RoutineCache<State>(clamp(cacheSize, 1, 65536)); in setRoutineCacheSize()
|
| /third_party/vk-gl-cts/framework/delibs/decpp/ |
| H A D | deDefs.hpp | 49 template<typename T> inline T clamp (T x, T a, T b) { DE_ASSERT(a <= b); return x < a ? a : (x > b ? b : x); } in clamp() function
|
| /third_party/vk-gl-cts/framework/opengl/ |
| H A D | gluTextureTestUtil.cpp | 105 const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1); in getSubView() 106 const int clampedMax = de::clamp(maxLevel, clampedBase, view.getNumLevels()-1); in getSubView() 113 const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1); in getSubView() 114 const int clampedMax = de::clamp(maxLevel, clampedBase, view.getNumLevels()-1); in getSubView() 121 const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1); in getSubView() 122 const int clampedMax = de::clamp(maxLevel, clampedBase, view.getNumLevels()-1); in getSubView() 134 const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1); in getSubView() 135 const int clampedMax = de::clamp(maxLevel, clampedBase, view.getNumLevels()-1); in getSubView() 142 const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1); in getSubView() 143 const int clampedMax = de::clamp(maxLeve in getSubView() [all...] |
| /third_party/python/Lib/ |
| H A D | _pydecimal.py | 445 ['prec', 'Emin', 'Emax', 'capitals', 'clamp', 'rounding', 'flags', 'traps'] 1663 # maximum length of payload is precision if clamp=0, 1664 # precision-1 if clamp=1. 1665 max_payload_len = context.prec - context.clamp 1690 # Emax if clamp==0, and between Etiny and Etop if clamp==1. 1694 exp_max = [context.Emax, Etop][context.clamp] 1754 # fold down if clamp == 1 and self has too few digits 1755 if context.clamp == 1 and self._exp > Etop: 2538 exp_max = [context.Emax, context.Etop()][context.clamp] 6095 clamp=0 global() variable [all...] |
| /kernel/linux/linux-5.10/drivers/clk/renesas/ |
| H A D | rcar-gen3-cpg.c | 131 mult = clamp(mult, min_mult, max_mult); in cpg_z_clk_determine_rate() 146 mult = clamp(mult, 1U, 32U); in cpg_z_clk_set_rate()
|
| /kernel/linux/linux-5.10/drivers/iio/adc/ |
| H A D | ingenic-adc.c | 325 div_main = clamp(div_main, 1u, 64u); in jz4725b_adc_init_clk_div() 360 div_main = clamp(div_main, 1u, 256u); in jz4770_adc_init_clk_div()
|
| /kernel/linux/linux-5.10/drivers/media/v4l2-core/ |
| H A D | v4l2-common.c | 100 x = clamp(x, (min + ~mask) & mask, max & mask); in clamp_align() 112 x = clamp(x, min, max); in clamp_roundup()
|
| /kernel/linux/linux-5.10/drivers/media/platform/vsp1/ |
| H A D | vsp1_histo.c | 323 sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); in histo_set_compose() 328 sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); in histo_set_compose()
|
| /kernel/linux/linux-5.10/drivers/media/usb/gspca/ |
| H A D | stk1135.c | 608 fmt->fmt.pix.width = clamp(fmt->fmt.pix.width, 32U, 1280U); in stk1135_try_fmt() 609 fmt->fmt.pix.height = clamp(fmt->fmt.pix.height, 32U, 1024U); in stk1135_try_fmt()
|
| /kernel/linux/linux-5.10/drivers/staging/media/hantro/ |
| H A D | rk3399_vpu_hw_vp8_dec.c | 289 u32 lf_level = clamp(lf->level + seg->lf_update[i], in cfg_lf() 327 u32 quant = clamp(q->y_ac_qi + seg->quant_update[i], in cfg_qp()
|
| /kernel/linux/linux-5.10/drivers/staging/iio/impedance-analyzer/ |
| H A D | ad5933.c | 415 val = clamp(val, (u16)0, (u16)0x7FF); in ad5933_store() 430 val = clamp(val, (u16)0, (u16)511); in ad5933_store()
|
| /kernel/linux/linux-6.6/drivers/media/platform/verisilicon/ |
| H A D | rockchip_vpu2_hw_vp8_dec.c | 288 u32 lf_level = clamp(lf->level + seg->lf_update[i], in cfg_lf() 326 u32 quant = clamp(q->y_ac_qi + seg->quant_update[i], in cfg_qp()
|
| /kernel/linux/linux-6.6/drivers/media/usb/gspca/ |
| H A D | stk1135.c | 608 fmt->fmt.pix.width = clamp(fmt->fmt.pix.width, 32U, 1280U); in stk1135_try_fmt() 609 fmt->fmt.pix.height = clamp(fmt->fmt.pix.height, 32U, 1024U); in stk1135_try_fmt()
|
| /kernel/linux/linux-6.6/drivers/thermal/tegra/ |
| H A D | tegra30-tsensor.c | 331 /* clamp hardware trips to the calibration limits */ in tegra_tsensor_get_hw_channel_trips() 332 *hot_trip = clamp(*hot_trip, 25000, 90000); in tegra_tsensor_get_hw_channel_trips() 341 *crit_trip = clamp(*crit_trip + 5000, 25000, 90000); in tegra_tsensor_get_hw_channel_trips()
|
| /kernel/linux/linux-6.6/drivers/staging/iio/impedance-analyzer/ |
| H A D | ad5933.c | 415 val = clamp(val, (u16)0, (u16)0x7FF); in ad5933_store() 430 val = clamp(val, (u16)0, (u16)511); in ad5933_store()
|
| /kernel/linux/linux-6.6/drivers/clk/ |
| H A D | clk-sp7021.c | 156 freq = clamp(freq, F_MIN, F_MAX); in plltv_integer_div() 223 freq = clamp(freq, F_MIN, F_MAX); in plltv_fractional_div()
|
| /kernel/linux/linux-6.6/drivers/cpufreq/ |
| H A D | mediatek-cpufreq.c | 100 new_vsram = clamp(new_vproc + soc_data->min_volt_shift, in mtk_cpufreq_voltage_tracking() 105 vsram = clamp(pre_vproc + soc_data->max_volt_shift, in mtk_cpufreq_voltage_tracking()
|
| /kernel/linux/linux-6.6/drivers/media/platform/renesas/vsp1/ |
| H A D | vsp1_histo.c | 327 sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); in histo_set_compose() 332 sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); in histo_set_compose()
|
| /kernel/linux/linux-6.6/kernel/time/ |
| H A D | ntp.c | 307 offset = clamp(offset, -USEC_PER_SEC, USEC_PER_SEC); in ntp_update_offset() 313 * clamp to the operating range. in ntp_update_offset() 315 offset = clamp(offset, -MAXPHASE, MAXPHASE); in ntp_update_offset()
|