cpu_asimdfhm.c 431 B

1234567891011121314151617
  1. #ifdef _MSC_VER
  2. #include <Intrin.h>
  3. #endif
  4. #include <arm_neon.h>
  5. int main(void)
  6. {
  7. float16x8_t vhp = vdupq_n_f16((float16_t)1);
  8. float16x4_t vlhp = vdup_n_f16((float16_t)1);
  9. float32x4_t vf = vdupq_n_f32(1.0f);
  10. float32x2_t vlf = vdup_n_f32(1.0f);
  11. int ret = (int)vget_lane_f32(vfmlal_low_u32(vlf, vlhp, vlhp), 0);
  12. ret += (int)vgetq_lane_f32(vfmlslq_high_u32(vf, vhp, vhp), 0);
  13. return ret;
  14. }