Skip to content

Commit

Permalink
Merge pull request #489 from howjmay/vld1_dup_f64
Browse files Browse the repository at this point in the history
feat: Add vld1[q]_dup_f64
  • Loading branch information
howjmay authored Jul 30, 2024
2 parents 769c1cb + a8de6b0 commit 806191d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions neon2rvv.h
Original file line number Diff line number Diff line change
Expand Up @@ -13254,9 +13254,9 @@ FORCE_INLINE float32x4_t vld1q_dup_f32(const float32_t *a) { return vdupq_n_f32(

// FORCE_INLINE poly16x8_t vld1q_dup_p16(poly16_t const * ptr);

// FORCE_INLINE float64x1_t vld1_dup_f64(float64_t const * ptr);
FORCE_INLINE float64x1_t vld1_dup_f64(float64_t const *a) { return vdup_n_f64(a[0]); }

// FORCE_INLINE float64x2_t vld1q_dup_f64(float64_t const * ptr);
FORCE_INLINE float64x2_t vld1q_dup_f64(float64_t const *a) { return vdupq_n_f64(a[0]); }

FORCE_INLINE uint8x16_t vld1q_dup_u8(const uint8_t *a) { return vdupq_n_u8(a[0]); }

Expand Down
20 changes: 18 additions & 2 deletions tests/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43751,9 +43751,25 @@ result_t test_vld1_dup_p16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { retu

result_t test_vld1q_dup_p16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }

result_t test_vld1_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
result_t test_vld1_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
#ifdef ENABLE_TEST_ALL
const double *_a = (const double *)impl.test_cases_float_pointer1;
float64x1_t c = vld1_dup_f64(_a);
return validate_double(c, _a[0]);
#else
return TEST_UNIMPL;
#endif // ENABLE_TEST_ALL
}

result_t test_vld1q_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
result_t test_vld1q_dup_f64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
#ifdef ENABLE_TEST_ALL
const double *_a = (const double *)impl.test_cases_float_pointer1;
float64x2_t c = vld1q_dup_f64(_a);
return validate_double(c, _a[0], _a[0]);
#else
return TEST_UNIMPL;
#endif // ENABLE_TEST_ALL
}

result_t test_vld1q_dup_u8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
#ifdef ENABLE_TEST_ALL
Expand Down
4 changes: 2 additions & 2 deletions tests/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2662,8 +2662,8 @@
_(vld1q_dup_u32) \
/*_(vld1q_dup_p8) */ \
/*_(vld1q_dup_p16) */ \
/*_(vld1_dup_f64) */ \
/*_(vld1q_dup_f64) */ \
_(vld1_dup_f64) \
_(vld1q_dup_f64) \
/*_(vld1q_dup_p64) */ \
_(vld1q_dup_s64) \
_(vld1q_dup_u64) \
Expand Down

0 comments on commit 806191d

Please sign in to comment.