| /third_party/mesa3d/src/panfrost/bifrost/test/ |
| H A D | test-optimizer.cpp | 95 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 98 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 103 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 106 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 111 I->clamp = BI_CLAMP_CLAMP_0_INF; in TEST_F() 114 I->clamp = BI_CLAMP_CLAMP_0_INF; in TEST_F() 122 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 125 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 130 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 133 I->clamp in TEST_F() [all...] |
| /third_party/skia/modules/canvaskit/ |
| H A D | color.js | 15 return CanvasKit.Color4f(clamp(r)/255, clamp(g)/255, clamp(b)/255, a); 28 return (((clamp(a) << 24) | (clamp(r) << 16) | (clamp(g) << 8) | (clamp(b) << 0) 152 return ((clamp(c[3]*255) << 24) | (clamp(c[0]*255) << 16) | (clamp( 193 function clamp(c) { global() function [all...] |
| /kernel/linux/linux-5.10/drivers/macintosh/ |
| H A D | windfarm_cpufreq_clamp.c | 68 struct wf_control *clamp; in wf_cpufreq_clamp_init() local 99 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); in wf_cpufreq_clamp_init() 100 if (clamp == NULL) { in wf_cpufreq_clamp_init() 105 clamp->ops = &clamp_ops; in wf_cpufreq_clamp_init() 106 clamp->name = "cpufreq-clamp"; in wf_cpufreq_clamp_init() 107 ret = wf_register_control(clamp); in wf_cpufreq_clamp_init() 111 clamp_control = clamp; in wf_cpufreq_clamp_init() 115 kfree(clamp); in wf_cpufreq_clamp_init() 134 MODULE_DESCRIPTION("CPU frequency clamp fo [all...] |
| /kernel/linux/linux-6.6/drivers/macintosh/ |
| H A D | windfarm_cpufreq_clamp.c | 66 struct wf_control *clamp; in wf_cpufreq_clamp_init() local 97 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); in wf_cpufreq_clamp_init() 98 if (clamp == NULL) { in wf_cpufreq_clamp_init() 103 clamp->ops = &clamp_ops; in wf_cpufreq_clamp_init() 104 clamp->name = "cpufreq-clamp"; in wf_cpufreq_clamp_init() 105 ret = wf_register_control(clamp); in wf_cpufreq_clamp_init() 109 clamp_control = clamp; in wf_cpufreq_clamp_init() 113 kfree(clamp); in wf_cpufreq_clamp_init() 132 MODULE_DESCRIPTION("CPU frequency clamp fo [all...] |
| /kernel/linux/linux-5.10/samples/bpf/ |
| H A D | tcp_clamp_kern.c | 7 * Sample BPF program to set send and receive buffers to 150KB, sndcwnd clamp 30 int clamp = 100; in bpf_clamp() local 71 &clamp, sizeof(clamp)); in bpf_clamp() 77 &clamp, sizeof(clamp)); in bpf_clamp()
|
| /kernel/linux/linux-6.6/samples/bpf/ |
| H A D | tcp_clamp_kern.c | 7 * Sample BPF program to set send and receive buffers to 150KB, sndcwnd clamp 30 int clamp = 100; in bpf_clamp() local 71 &clamp, sizeof(clamp)); in bpf_clamp() 77 &clamp, sizeof(clamp)); in bpf_clamp()
|
| /third_party/skia/src/core/ |
| H A D | SkColorFilter_Matrix.cpp | 34 SkColorFilter_Matrix::SkColorFilter_Matrix(const float array[20], Domain domain, Clamp clamp) in SkColorFilter_Matrix() argument 37 , fClamp(clamp) { in SkColorFilter_Matrix() 67 Clamp clamp = buffer.isVersionLT(SkPicturePriv::kUnclampedMatrixColorFilter) in CreateProc() local 70 return is_rgba ? SkColorFilters::Matrix(matrix, clamp) in CreateProc() 202 // Convert HSLA -> RGBA (including clamp and premul). 264 SkColorFilters::Clamp clamp) { in MakeMatrix() 268 return sk_make_sp<SkColorFilter_Matrix>(array, domain, clamp); in MakeMatrix() 271 sk_sp<SkColorFilter> SkColorFilters::Matrix(const float array[20], Clamp clamp) { in Matrix() argument 272 return MakeMatrix(array, SkColorFilter_Matrix::Domain::kRGBA, clamp); in Matrix() 275 sk_sp<SkColorFilter> SkColorFilters::Matrix(const SkColorMatrix& cm, Clamp clamp) { in Matrix() argument 262 MakeMatrix(const float array[20], SkColorFilter_Matrix::Domain domain, SkColorFilters::Clamp clamp) MakeMatrix() argument [all...] |
| H A D | SkBitmapProcState_matrixProcs.cpp | 55 // The clamp routines may try to fall into one of these unclamped decal fast-paths. 56 // (Only clamp works in the right coordinate space to check for decal.) 142 // used when both tilex and tiley are clamp 145 // If we're already scaled up to by max like clamp/decal, in extract_low_bits_clamp_clamp() 150 //used when one of tilex and tiley is not clamp 246 static unsigned clamp(SkFixed fx, int max) { 251 nofilter_scale <clamp, clamp, true>, filter_scale <clamp, clamp, extract_low_bits_clamp_clam [all...] |
| /third_party/vk-gl-cts/framework/common/ |
| H A D | tcuTexCompareVerifier.cpp | 66 const float cmpValue = (clampValues) ? (de::clamp(cmpValue_, 0.0f, 1.0f)) : (cmpValue_); in execCompare() 67 const float cmpReference = (clampValues) ? (de::clamp(cmpReference_, 0.0f, 1.0f)) : (cmpReference_); in execCompare() 615 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); 616 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); 617 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); 618 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f); 741 const float minA0 = de::clamp((uBounds0.x()-0.5f)-float(i0), 0.0f, 1.0f); 742 const float maxA0 = de::clamp((uBounds0.y()-0.5f)-float(i0), 0.0f, 1.0f); 743 const float minB0 = de::clamp((vBounds0.x()-0.5f)-float(j0), 0.0f, 1.0f); 744 const float maxB0 = de::clamp((vBounds [all...] |
| H A D | tcuTexLookupVerifier.cpp | 699 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 700 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 762 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 763 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 764 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 765 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 838 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 839 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 840 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 841 const float maxB = de::clamp((vBound in isLinearSampleResultValid() [all...] |
| /base/sensors/miscdevice/utils/tools/haptic_format_converter/converter/ |
| H A D | converter.py | 352 def clamp(value: float, min_value: float, max_value: float) -> float: function 357 value (float): Value to clamp. 396 "Intensity": clamp(pattern['Parameters']['Intensity'], 0, 100), 397 "Frequency": clamp(pattern['Parameters'].get('Frequency', 50), -100, 100) 406 "Intensity": clamp(point.get('Intensity', 100), 0, 100), 407 "Frequency": clamp(point.get('Frequency', 0), -100, 100) 453 "Duration": clamp(pattern.get('Duration', 1000), 1, 5000), 455 "Intensity": clamp(pattern['Parameters'].get('Intensity', 100), 0, 100), 456 "Frequency": clamp(pattern['Parameters'].get('Frequency', 50), -100, 100), 459 "Time": clamp(poin [all...] |
| /third_party/python/Modules/_decimal/libmpdec/ |
| H A D | context.c | 96 ctx->clamp=0; in mpd_maxcontext() 110 ctx->clamp=0; in mpd_defaultcontext() 124 ctx->clamp=0; in mpd_basiccontext() 142 ctx->clamp=1; in mpd_ieee_context() 187 return ctx->clamp; in mpd_getclamp() 263 ctx->clamp = c; in mpd_qsetclamp()
|
| /third_party/mesa3d/src/gallium/auxiliary/draw/ |
| H A D | draw_pipe_offset.c | 47 float clamp; member 115 if (offset->clamp) in do_offset_tri() 116 zoffset = (offset->clamp < 0.0f) ? MAX2(zoffset, offset->clamp) : in do_offset_tri() 117 MIN2(zoffset, offset->clamp); in do_offset_tri() 180 offset->clamp = rast->offset_clamp; in offset_first_tri() 195 offset->clamp = 0.0f; in offset_first_tri()
|
| /third_party/skia/src/gpu/effects/ |
| H A D | GrBicubicEffect.cpp | 88 // Bicubic can send colors out of range, so clamp to get them back in (source) gamut. in emitCode() 89 // The kind of clamp we have to do depends on the alpha type. in emitCode() 120 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make() local 122 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in Make() 136 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make() local 138 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in Make() 155 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in MakeSubset() local 157 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in MakeSubset() 183 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in MakeSubset() local 185 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in MakeSubset() 193 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; Make() local 198 GrBicubicEffect(std::unique_ptr<GrFragmentProcessor> fp, SkImage::CubicResampler kernel, Direction direction, Clamp clamp) GrBicubicEffect() argument [all...] |
| /third_party/mesa3d/src/mesa/main/ |
| H A D | blend.c | 1042 _mesa_ClampColor(GLenum target, GLenum clamp) in _mesa_ClampColor() argument 1054 if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) { in _mesa_ClampColor() 1055 _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)"); in _mesa_ClampColor() 1064 ctx->Light.ClampVertexColor = clamp; in _mesa_ClampColor() 1070 if (ctx->Color.ClampFragmentColor != clamp) { in _mesa_ClampColor() 1072 ctx->Color.ClampFragmentColor = clamp; in _mesa_ClampColor() 1077 ctx->Color.ClampReadColor = clamp; in _mesa_ClampColor() 1091 get_clamp_color(const struct gl_framebuffer *fb, GLenum clamp) in get_clamp_color() argument 1131 GLboolean clamp; _mesa_update_clamp_fragment_color() local [all...] |
| /third_party/mesa3d/src/gallium/frontends/nine/ |
| H A D | nine_limits.h | 46 } clamp; member 60 [D3DRS_##o] = {NINE_STATE_CLAMP, {.clamp = {m, M}}} 191 if (Value < behaviour.u.clamp.min) in nine_fix_render_state_value() 192 Value = behaviour.u.clamp.min; in nine_fix_render_state_value() 193 else if (Value > behaviour.u.clamp.max) in nine_fix_render_state_value() 194 Value = behaviour.u.clamp.max; in nine_fix_render_state_value()
|
| /third_party/vk-gl-cts/external/vulkancts/modules/vulkan/shaderexecutor/ |
| H A D | vktShaderPackingFunctionTests.cpp | 189 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 190 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 297 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 298 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 408 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 409 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
| /third_party/vk-gl-cts/modules/gles31/functional/ |
| H A D | es31fShaderPackingFunctionTests.cpp | 185 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 186 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 275 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 276 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 376 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 377 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
| /third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/shaderexecutor/ |
| H A D | vktShaderPackingFunctionTests.cpp | 189 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 190 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 297 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 298 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 408 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 409 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
| /third_party/skia/third_party/externals/swiftshader/src/Device/ |
| H A D | ASTC_Decoder.cpp | 70 pix[0] = static_cast<unsigned char>(sw::clamp(fptr[0], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 71 pix[1] = static_cast<unsigned char>(sw::clamp(fptr[1], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 72 pix[2] = static_cast<unsigned char>(sw::clamp(fptr[2], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 73 pix[3] = static_cast<unsigned char>(sw::clamp(fptr[3], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock()
|
| H A D | PixelProcessor.cpp | 62 factor.blendConstantU[i] = clamp(blendConstant[i], 0.0f, 1.0f); in setBlendConstant() 63 factor.invBlendConstantU[i] = 1.0f - clamp(blendConstant[i], 0.0f, 1.0f); in setBlendConstant() 64 factor.blendConstantS[i] = clamp(blendConstant[i], -1.0f, 1.0f); in setBlendConstant() 65 factor.invBlendConstantS[i] = 1.0f - clamp(blendConstant[i], -1.0f, 1.0f); in setBlendConstant() 71 routineCache = std::make_unique<RoutineCacheType>(clamp(cacheSize, 1, 65536)); in setRoutineCacheSize()
|
| /third_party/skia/third_party/externals/swiftshader/src/Renderer/ |
| H A D | Color.hpp | 95 r = clamp(c.r >> 4, 0, 255); in Color() 96 g = clamp(c.g >> 4, 0, 255); in Color() 97 b = clamp(c.b >> 4, 0, 255); in Color() 98 a = clamp(c.a >> 4, 0, 255); in Color() 104 r = ifloor(clamp(c.r * 256.0f, 0.0f, 255.0f)); in Color() 105 g = ifloor(clamp(c.g * 256.0f, 0.0f, 255.0f)); in Color() 106 b = ifloor(clamp(c.b * 256.0f, 0.0f, 255.0f)); in Color() 107 a = ifloor(clamp(c.a * 256.0f, 0.0f, 255.0f)); in Color() 140 r = iround(clamp(c.r * 4095.0f, -4096.0f, 4095.0f)); in Color() 141 g = iround(clamp( in Color() [all...] |
| /third_party/astc-encoder/Source/ |
| H A D | astcenc_compute_variance.cpp | 164 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 170 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 175 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance() 208 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 214 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 219 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance() 247 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 253 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 258 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance()
|
| /kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/ |
| H A D | sh_css_param_shading.c | 132 src_y0 = clamp(src_y0, 0, (int)table_height - 1); in crop_and_interpolate() 133 src_y1 = clamp(src_y1, 0, (int)table_height - 1); in crop_and_interpolate() 134 ty = min(clamp(ty, 0, (int)sensor_height - 1), in crop_and_interpolate() 165 src_x0 = clamp(src_x0, 0, (int)table_width - 1); in crop_and_interpolate() 166 src_x1 = clamp(src_x1, 0, (int)table_width - 1); in crop_and_interpolate() 167 tx = min(clamp(tx, 0, (int)sensor_width - 1), in crop_and_interpolate()
|
| /kernel/linux/linux-6.6/drivers/staging/media/atomisp/pci/ |
| H A D | sh_css_param_shading.c | 135 src_y0 = clamp(src_y0, 0, (int)table_height - 1); in crop_and_interpolate() 136 src_y1 = clamp(src_y1, 0, (int)table_height - 1); in crop_and_interpolate() 137 ty = min(clamp(ty, 0, (int)sensor_height - 1), in crop_and_interpolate() 168 src_x0 = clamp(src_x0, 0, (int)table_width - 1); in crop_and_interpolate() 169 src_x1 = clamp(src_x1, 0, (int)table_width - 1); in crop_and_interpolate() 170 tx = min(clamp(tx, 0, (int)sensor_width - 1), in crop_and_interpolate()
|