8000 Merge pull request #48 from howjmay/vst2_s8 · plctlab/numpy@ebf8a79 · GitHub
[go: up one dir, main page]

Skip to content

Commit ebf8a79

Browse files
authored
Merge pull request numpy#48 from howjmay/vst2_s8
feat: Add vst2_s8
2 parents eaf62f1 + bff3e39 commit ebf8a79

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

neon2rvv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ FORCE_INLINE int8x8x2_t vld2_s8(const int8_t *__a) { return __riscv_vlseg2e8_v_i
28222822

28232823
// FORCE_INLINE uint64x1x2_t vld2_dup_u64(const uint64_t *__a);
28242824

2825-
// FORCE_INLINE void vst2_s8(int8_t *__a, int8x8x2_t __b);
2825+
FORCE_INLINE void vst2_s8(int8_t *__a, int8x8x2_t __b) { return __riscv_vsseg2e8_v_i8mf2x2(__a, __b, 8); }
28262826

28272827
// FORCE_INLINE void vst2_s16(int16_t *__a, int16x4x2_t __b);
28282828

tests/impl.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3701,7 +3701,14 @@ result_t test_vld2_dup_s64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { retu
37013701

37023702
result_t test_vld2_dup_u64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
37033703

3704-
result_t test_vst2_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
3704+
result_t test_vst2_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
3705+
const int8_t *_a = (int8_t *)impl.test_cases_int_pointer1;
3706+
int8_t _b[16];
3707+
int8x8x2_t a = vld2_s8(_a);
3708+
vst2_s8(_b, a);
3709+
return validate_int8(a, _b[0], _b[2], _b[4], _b[6], _b[8], _b[10], _b[12], _b[14], _b[1], _b[3], _b[5], _b[7], _b[9],
3710+
_b[11], _b[13], _b[15]);
3711+
}
37053712

37063713
result_t test_vst2_s16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
37073714

0 commit comments

Comments
 (0)
0