• Home
  • Raw
  • Download

Lines Matching refs:a

29     uint32_t a = s ? -x : x;  in gglRecipQNormalized()  local
32 if (ggl_unlikely(a <= 2LU)) { in gglRecipQNormalized()
40 const int32_t lz = gglClz(a); in gglRecipQNormalized()
41 a <<= lz; // 0.32 in gglRecipQNormalized()
42 uint32_t r = a; in gglRecipQNormalized()
46 if (a != 0x80000000) { in gglRecipQNormalized()
50 r = (((2LU<<30) - uint32_t((uint64_t(a)*r) >> 32)) * uint64_t(r)) >> 30; in gglRecipQNormalized()
51 r = (((2LU<<30) - uint32_t((uint64_t(a)*r) >> 32)) * uint64_t(r)) >> 30; in gglRecipQNormalized()
93 const GGLfixed a = x; in gglSqrtRecipx() local
95 x = ggl_sqrt_reciproc_approx_tab[(a>>(28-lz))&0x7]; in gglSqrtRecipx()
103 x = gglMulx((x>>1),(0x30000 - gglMulx(gglMulx(a,x),x))); in gglSqrtRecipx()
104 x = gglMulx((x>>1),(0x30000 - gglMulx(gglMulx(a,x),x))); in gglSqrtRecipx()
108 GGLfixed gglSqrtx(GGLfixed a) in gglSqrtx() argument
118 if (a >= temp) { in gglSqrtx()
120 a -= temp; in gglSqrtx()
248 static inline void swap(T& a, T& b) { in swap() argument
249 T t(a); in swap()
250 a = b; in swap()
255 int32_t slow_muldiv(uint32_t a, uint32_t b, uint32_t c) in slow_muldiv() argument
259 uint64_t ab = uint64_t(a)*b; in slow_muldiv()
291 int32_t quick_muldiv(int32_t a, int32_t b, int32_t c) in quick_muldiv() argument
294 int leading = gglClz(a); in quick_muldiv()
296 a <<= leading; in quick_muldiv()
299 if (a < 0) in quick_muldiv()
301 a <<= 1; in quick_muldiv()
320 int32_t gglMulDivi(int32_t a, int32_t b, int32_t c) in gglMulDivi() argument
323 int32_t sign = a^b^c; in gglMulDivi()
325 if (a < 0) a = -a; in gglMulDivi()
329 if (a < b) { in gglMulDivi()
330 swap(a, b); in gglMulDivi()
333 if (b <= c) result = quick_muldiv(a, b, c); in gglMulDivi()
334 else result = slow_muldiv((uint32_t)a, (uint32_t)b, (uint32_t)c); in gglMulDivi()