mirror of
https://github.com/bkaradzic/bx.git
synced 2026-06-08 03:03:48 +00:00
Fixed build. (#387)
This commit is contained in:
committed by
GitHub
parent
22f7b051b9
commit
6ce72eac63
@@ -287,8 +287,13 @@ namespace bx
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_splat(double _a)
|
||||
{
|
||||
#if BX_ARCH_64BIT
|
||||
const float64x2_t tmp = vdupq_n_f64(_a);
|
||||
return vreinterpretq_f32_f64(tmp);
|
||||
#else
|
||||
const float val = float(_a);
|
||||
return vdupq_n_f32(val);
|
||||
#endif // BX_ARCH_64BIT
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -392,6 +397,12 @@ namespace bx
|
||||
return simd_f32_rcp_ni(_a);
|
||||
}
|
||||
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_f32_rsqrt_est(simd128_neon_t _a)
|
||||
{
|
||||
return vrsqrteq_f32(_a);
|
||||
}
|
||||
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_f32_sqrt(simd128_neon_t _a)
|
||||
{
|
||||
@@ -400,13 +411,7 @@ namespace bx
|
||||
#else
|
||||
const simd128_neon_t rsqrt = simd128_f32_rsqrt_est<simd128_neon_t>(_a);
|
||||
return simd128_f32_mul<simd128_neon_t>(_a, rsqrt);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_f32_rsqrt_est(simd128_neon_t _a)
|
||||
{
|
||||
return vrsqrteq_f32(_a);
|
||||
#endif // BX_ARCH_64BIT
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -842,19 +847,27 @@ namespace bx
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_x8_shuffle(simd128_neon_t _a, simd128_neon_t _indices)
|
||||
{
|
||||
#if BX_ARCH_64BIT
|
||||
const uint8x16_t a = vreinterpretq_u8_f32(_a);
|
||||
const uint8x16_t indices = vreinterpretq_u8_f32(_indices);
|
||||
const uint8x16_t result = vqtbl1q_u8(a, indices);
|
||||
return vreinterpretq_f32_u8(result);
|
||||
#else
|
||||
return simd_x8_shuffle_ni(_a, _indices);
|
||||
#endif // BX_ARCH_64BIT
|
||||
}
|
||||
|
||||
template<>
|
||||
BX_SIMD_FORCE_INLINE simd128_neon_t simd128_x8_shuffle(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _indices)
|
||||
{
|
||||
#if BX_ARCH_64BIT
|
||||
const uint8x16x2_t tbl = { { vreinterpretq_u8_f32(_a), vreinterpretq_u8_f32(_b) } };
|
||||
const uint8x16_t indices = vreinterpretq_u8_f32(_indices);
|
||||
const uint8x16_t result = vqtbl2q_u8(tbl, indices);
|
||||
return vreinterpretq_f32_u8(result);
|
||||
#else
|
||||
return simd_x8_shuffle_ni(_a, _b, _indices);
|
||||
#endif // BX_ARCH_64BIT
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_madd(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_madd(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -274,7 +274,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_msub(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_msub(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -290,7 +290,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_nmsub(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_nmsub(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _c)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -306,7 +306,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_neg(simd256_ref_t _a)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_neg(simd256_ref_t _a)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -351,7 +351,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_lerp(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _s)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_lerp(simd256_ref_t _a, simd256_ref_t _b, simd256_ref_t _s)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -450,7 +450,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_f32_cmpneq(simd256_ref_t _a, simd256_ref_t _b)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_f32_cmpneq(simd256_ref_t _a, simd256_ref_t _b)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_f32_langext_t a = bitCast<simd256_f32_langext_t>(_a);
|
||||
@@ -532,7 +532,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_i32_neg(simd256_ref_t _a)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_i32_neg(simd256_ref_t _a)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_i32_langext_t a = bitCast<simd256_i32_langext_t>(_a);
|
||||
@@ -813,7 +813,7 @@ namespace bx
|
||||
}
|
||||
|
||||
template<>
|
||||
inline BX_CONSTEXPR_FUNC simd256_ref_t simd256_andc(simd256_ref_t _a, simd256_ref_t _b)
|
||||
inline BX_CONST_FUNC simd256_ref_t simd256_andc(simd256_ref_t _a, simd256_ref_t _b)
|
||||
{
|
||||
#if BX_SIMD_LANGEXT
|
||||
const simd256_u32_langext_t a = bitCast<simd256_u32_langext_t>(_a);
|
||||
|
||||
Reference in New Issue
Block a user