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

Function lsl

Source/astcenc_vecmathlib_none_4.h:565–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563 * @brief Logical shift left.
564 */
565template <int s> ASTCENC_SIMD_INLINE vint4 lsl(vint4 a)
566{
567 // Cast to unsigned to avoid shift in/out of sign bit undefined behavior
568 unsigned int as0 = static_cast<unsigned int>(a.m[0]) << s;
569 unsigned int as1 = static_cast<unsigned int>(a.m[1]) << s;
570 unsigned int as2 = static_cast<unsigned int>(a.m[2]) << s;
571 unsigned int as3 = static_cast<unsigned int>(a.m[3]) << s;
572
573 return vint4(static_cast<int>(as0),
574 static_cast<int>(as1),
575 static_cast<int>(as2),
576 static_cast<int>(as3));
577}
578
579/**
580 * @brief Logical shift right.

Callers

nothing calls this directly

Calls 1

vint4Class · 0.70

Tested by

no test coverage detected