MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / clamp

Function clamp

Source/astcenc_vecmathlib_common_4.h:100–103  ·  view source on GitHub ↗

* @brief Return the clamped value between min and max. */

Source from the content-addressed store, hash-verified

98 * @brief Return the clamped value between min and max.
99 */
100ASTCENC_SIMD_INLINE vint4 clamp(int minv, int maxv, vint4 a)
101{
102 return min(max(a, vint4(minv)), vint4(maxv));
103}
104
105/**
106 * @brief Return the horizontal sum of RGB vector lanes as a scalar.

Callers

nothing calls this directly

Calls 3

minFunction · 0.70
maxFunction · 0.70
vint4Class · 0.70

Tested by

no test coverage detected