Skip to content

Commit 4ad8d31

Browse files
committed
Test _ScalarAbi<N>
ChangeLog: * tests/misc.cpp: Disable conversion to vector builtins with _ScalarAbi. * tests/unittest.h:
1 parent 3bebe45 commit 4ad8d31

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tests/misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ template <typename V>
1818
using T = typename V::value_type;
1919
using M = typename V::mask_type;
2020

21-
ADD_TEST(misc) {
21+
ADD_TEST(misc, !simd::__scalar_abi_tag<typename V::abi_type>) {
2222
std::tuple{vec<V, 0, 100, 2, 54, 3>},
2323
[](auto& t, V x) {
2424
t.verify_equal(x, x);

tests/unittest.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,15 @@ void test_runner()
197197
for (auto f : run_functions)
198198
f();
199199
}
200+
if constexpr (!std::is_same_v<typename simd::vec<T, N>::abi_type, simd::_ScalarAbi<N>>)
201+
{
202+
using V = simd::basic_vec<T, simd::_ScalarAbi<N>>;
203+
std::cout << "Testing " << type_to_string<V>() << ':' << std::endl;
204+
run_functions.clear();
205+
[[maybe_unused]] Tests<V> t0 = {};
206+
for (auto f : run_functions)
207+
f();
208+
}
200209
}
201210
else
202211
{

0 commit comments

Comments
 (0)