summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2022-04-22 13:43:19 +0900
committerjiyong.min <jiyong.min@samsung.com>2022-04-22 13:45:45 +0900
commit2cfcf8e1f81f73bef7036aa401264e72d358fdb2 (patch)
tree224e25f2163a142842712a2da7bd5d078152e518
parentfc34a039a3e7a0586c1cdf8ab03ca0831de9c024 (diff)
downloadlibjxl-2cfcf8e1f81f73bef7036aa401264e72d358fdb2.tar.gz
libjxl-2cfcf8e1f81f73bef7036aa401264e72d358fdb2.tar.bz2
libjxl-2cfcf8e1f81f73bef7036aa401264e72d358fdb2.zip
- don't use (__ARM_FP & 2) for tizen Change-Id: If23708d27705099e0cf725bd6af629f878e4ce3d
-rw-r--r--third_party/highway/hwy/base.h10
-rw-r--r--third_party/highway/hwy/ops/arm_neon-inl.h6
2 files changed, 6 insertions, 10 deletions
diff --git a/third_party/highway/hwy/base.h b/third_party/highway/hwy/base.h
index c9e0d0c..cfcf3f9 100644
--- a/third_party/highway/hwy/base.h
+++ b/third_party/highway/hwy/base.h
@@ -220,7 +220,8 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16;
// Match [u]int##_t naming scheme so rvv-inl.h macros can obtain the type name
// by concatenating base type and bits.
-#if HWY_ARCH_ARM && (__ARM_FP & 2)
+// Avoid __ARM_FP build error
+#if HWY_ARCH_ARM && (__ARM_FP & 2) && !(__TIZEN__)
#define HWY_NATIVE_FLOAT16 1
#else
#define HWY_NATIVE_FLOAT16 0
@@ -231,17 +232,10 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16;
#if defined(HWY_EMULATE_SVE)
using float16_t = FarmFloat16;
#elif HWY_NATIVE_FLOAT16
-// Avoid "'__fp16' and '_Float16' not declared" build error
-#if defined(__TIZEN__)
-struct float16_t {
- uint16_t bits;
-};
-#else
using float16_t = __fp16;
// Clang does not allow __fp16 arguments, but scalar.h requires LaneType
// arguments, so use a wrapper.
// TODO(janwas): replace with _Float16 when that is supported?
-#endif
#else
struct float16_t {
uint16_t bits;
diff --git a/third_party/highway/hwy/ops/arm_neon-inl.h b/third_party/highway/hwy/ops/arm_neon-inl.h
index 774ca5d..b7a43c2 100644
--- a/third_party/highway/hwy/ops/arm_neon-inl.h
+++ b/third_party/highway/hwy/ops/arm_neon-inl.h
@@ -2491,7 +2491,8 @@ HWY_API Vec128<int64_t, N> PromoteTo(Simd<int64_t, N> /* tag */,
return Vec128<int64_t, N>(vget_low_s64(vmovl_s32(v.raw)));
}
-#if __ARM_FP & 2
+// Avoid __ARM_FP build error
+#if (__ARM_FP & 2) && !(__TIZEN__)
HWY_API Vec128<float> PromoteTo(Full128<float> /* tag */,
const Vec128<float16_t, 4> v) {
@@ -2621,7 +2622,8 @@ HWY_API Vec128<int8_t, N> DemoteTo(Simd<int8_t, N> /* tag */,
return Vec128<int8_t, N>(vqmovn_s16(vcombine_s16(v.raw, v.raw)));
}
-#if __ARM_FP & 2
+// Avoid __ARM_FP build error
+#if (__ARM_FP & 2) && !(__TIZEN__)
HWY_API Vec128<float16_t, 4> DemoteTo(Simd<float16_t, 4> /* tag */,
const Vec128<float> v) {