8000 Merge pull request #13 from howjmay/vmov_n_s8 · plctlab/numpy@527d1e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 527d1e6

Browse files
authored
Merge pull request #13 from howjmay/vmov_n_s8
feat: Add vmov_n_s8
2 parents 4080cab + efae396 commit 527d1e6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

neon2rvv.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,9 +1761,7 @@ FORCE_INLINE uint8x8_t vcgt_s8(int8x8_t __a, int8x8_t __b) {
17611761

17621762
// FORCE_INLINE uint64x1_t vcreate_u64(uint64_t __a);
17631763

1764-
FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) {
1765-
return __riscv_vmv_s_x_i8mf2(__a, 8);
1766-
}
1764+
FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) { return __riscv_vmv_s_x_i8mf2(__a, 8); }
17671765

17681766
// FORCE_INLINE int16x4_t vdup_n_s16(int16_t __a);
17691767

@@ -1799,7 +1797,7 @@ FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) {
17991797

18001798
// FORCE_INLINE uint64x2_t vdupq_n_u64(uint64_t __a);
18011799

1802-
// FORCE_INLINE int8x8_t vmov_n_s8(int8_t __a);
1800+
FORCE_INLINE int8x8_t vmov_n_s8(int8_t __a) { return vdup_n_s8(__a); }
18031801

18041802
// FORCE_INLINE int16x4_t vmov_n_s16(int16_t __a);
18051803

tests/impl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,11 @@ result_t test_vdupq_n_s64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { retur
23182318

23192319
result_t test_vdupq_n_u64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
23202320

2321-
result_t test_vmov_n_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
2321+
result_t test_vmov_n_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
2322+
const int8_t _a = impl.test_cases_ints[0];
2323+
int8x8_t c = vmov_n_s8(_a);
2324+
return validate_int8(c, _a, _a, _a, _a, _a, _a, _a, _a);
2325+
}
23222326

23232327
result_t test_vmov_n_s16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
23242328

0 commit comments

Comments
 (0)
0