Update googletest to 1.18.0 and SIMDe to 0.8.2.
Googletest 1.18 asks for CMake 3.13 or newer, so configuring the tests no longer warns that CMake compatibility below 3.10 is deprecated. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e4e666f459
commit
3f10e05176
912 changed files with 224964 additions and 11502 deletions
108
thirdparty/simde/test/arm/neon/qrshrn_n.c
vendored
108
thirdparty/simde/test/arm/neon/qrshrn_n.c
vendored
|
|
@ -605,6 +605,112 @@ test_simde_vqrshrn_n_u64 (SIMDE_MUNIT_TEST_ARGS) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
test_simde_vqrshrnh_n_s16 (SIMDE_MUNIT_TEST_ARGS) {
|
||||
static const struct {
|
||||
int16_t a;
|
||||
int8_t r1;
|
||||
int8_t r3;
|
||||
int8_t r5;
|
||||
int8_t r7;
|
||||
int8_t r8;
|
||||
} test_vec[] = {
|
||||
{ INT16_C( 32767),
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX },
|
||||
{ INT16_C( 29541),
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_C( 115) },
|
||||
{ -INT16_C( 32766),
|
||||
INT8_MIN,
|
||||
INT8_MIN,
|
||||
INT8_MIN,
|
||||
INT8_MIN,
|
||||
INT8_MIN },
|
||||
{ INT16_C( 5687),
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_MAX,
|
||||
INT8_C( 44),
|
||||
INT8_C( 22) }
|
||||
};
|
||||
|
||||
for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])) ; i++) {
|
||||
int16_t r1 = simde_vqrshrnh_n_s16(test_vec[i].a, 1);
|
||||
int16_t r3 = simde_vqrshrnh_n_s16(test_vec[i].a, 3);
|
||||
int16_t r5 = simde_vqrshrnh_n_s16(test_vec[i].a, 5);
|
||||
int16_t r7 = simde_vqrshrnh_n_s16(test_vec[i].a, 7);
|
||||
int16_t r8 = simde_vqrshrnh_n_s16(test_vec[i].a, 8);
|
||||
|
||||
simde_assert_equal_i16(r1, test_vec[i].r1);
|
||||
simde_assert_equal_i16(r3, test_vec[i].r3);
|
||||
simde_assert_equal_i16(r5, test_vec[i].r5);
|
||||
simde_assert_equal_i16(r7, test_vec[i].r7);
|
||||
simde_assert_equal_i16(r8, test_vec[i].r8);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
test_simde_vqrshrnh_n_u16 (SIMDE_MUNIT_TEST_ARGS) {
|
||||
static const struct {
|
||||
uint16_t a;
|
||||
uint8_t r1;
|
||||
uint8_t r3;
|
||||
uint8_t r5;
|
||||
uint8_t r7;
|
||||
uint8_t r8;
|
||||
} test_vec[] = {
|
||||
{ UINT16_C( 32767),
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_C( 128) },
|
||||
{ UINT16_C( 29541),
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_C( 231),
|
||||
UINT8_C( 115) },
|
||||
{ UINT16_C( 12766),
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_C( 100),
|
||||
UINT8_C( 50) },
|
||||
{ UINT16_C( 5687),
|
||||
UINT8_MAX,
|
||||
UINT8_MAX,
|
||||
UINT8_C( 178),
|
||||
UINT8_C( 44),
|
||||
UINT8_C( 22) }
|
||||
};
|
||||
|
||||
for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])) ; i++) {
|
||||
uint16_t r1 = simde_vqrshrnh_n_u16(test_vec[i].a, 1);
|
||||
uint16_t r3 = simde_vqrshrnh_n_u16(test_vec[i].a, 3);
|
||||
uint16_t r5 = simde_vqrshrnh_n_u16(test_vec[i].a, 5);
|
||||
uint16_t r7 = simde_vqrshrnh_n_u16(test_vec[i].a, 7);
|
||||
uint16_t r8 = simde_vqrshrnh_n_u16(test_vec[i].a, 8);
|
||||
|
||||
simde_assert_equal_u16(r1, test_vec[i].r1);
|
||||
simde_assert_equal_u16(r3, test_vec[i].r3);
|
||||
simde_assert_equal_u16(r5, test_vec[i].r5);
|
||||
simde_assert_equal_u16(r7, test_vec[i].r7);
|
||||
simde_assert_equal_u16(r8, test_vec[i].r8);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
test_simde_vqrshrns_n_s32 (SIMDE_MUNIT_TEST_ARGS) {
|
||||
#if 1
|
||||
|
|
@ -1004,6 +1110,8 @@ SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrn_n_s64)
|
|||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrn_n_u16)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrn_n_u32)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrn_n_u64)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrnh_n_s16)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrnh_n_u16)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrns_n_s32)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrns_n_u32)
|
||||
SIMDE_TEST_FUNC_LIST_ENTRY(vqrshrnd_n_s64)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue