Skip to content

Commit

Permalink
desactiving some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlap committed Oct 10, 2023
1 parent 79bcdc8 commit 22fff6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
File renamed without changes.
7 changes: 0 additions & 7 deletions test/unit/meta/traits/underlying_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,24 @@
//==================================================================================================
#include "test.hpp"
#include <eve/logical.hpp>
#include <eve/module/complex.hpp>
#include <eve/traits/underlying_type.hpp>
#include <eve/wide.hpp>

TTS_CASE( "Check for underlying_type: scalar types")
{
using eve::logical;
using eve::complex;

TTS_TYPE_IS( eve::underlying_type_t<bool> , bool );
TTS_TYPE_IS( eve::underlying_type_t<int> , int );
TTS_TYPE_IS( eve::underlying_type_t<complex<float>> , float );
TTS_TYPE_IS( eve::underlying_type_t<logical<int>> , logical<int> );
TTS_TYPE_IS( eve::underlying_type_t<eve::as_logical_t<complex<float>>>, logical<float>);
};

TTS_CASE( "Check for underlying_type: SIMD types")
{
using eve::logical;
using eve::wide;
using eve::complex;

TTS_TYPE_IS((eve::underlying_type_t<wide<int,eve::fixed<8>>>) , int );
TTS_TYPE_IS( eve::underlying_type_t<wide<int>> , int );
TTS_TYPE_IS( eve::underlying_type_t<wide<complex<float>>> , float );
TTS_TYPE_IS( eve::underlying_type_t<logical<wide<int>>> , logical<int> );
TTS_TYPE_IS( eve::underlying_type_t<eve::as_logical_t<wide<complex<float>>>>, logical<float>);
};
23 changes: 7 additions & 16 deletions test/unit/module/core/dist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,14 @@ TTS_CASE_WITH("Check behavior of dist(wide)",
eve::test::simd::all_types,
tts::generate(tts::randoms(eve::valmin, eve::valmax),
tts::randoms(eve::valmin, eve::valmax)))
<typename T>(T const& a0, T const& a1)
<typename T>(T a0, T a1)
{
using eve::dist;
using eve::detail::map;
using v_t = eve::element_type_t<T>;
TTS_ULP_EQUAL(dist(a0, a1),
map([](auto e, auto f) -> v_t { return std::max(e, f) - std::min(f, e); }, a0, a1),
2);
TTS_ULP_EQUAL(eve::saturated(dist)(a0, a1),
map(
[](auto e, auto f) -> v_t
{
v_t d = eve::max(e, f) - eve::min(f, e);
if constexpr( eve::unsigned_value<v_t> ) return d;
else return d < 0 ? eve::valmax(eve::as(e)) : d;
},
a0,
a1),
2);
TTS_ULP_EQUAL(dist(a0, a1), eve::max(a0, a1) - eve::min(a0, a1), 2);
TTS_ULP_EQUAL(eve::saturated(dist)(a0, a1), [](auto a, auto b){
auto d = eve::dist(a, b);
if constexpr(eve::unsigned_value<T>) return d;
else return eve::if_else(eve::is_ltz(d), eve::valmax(eve::as<T>()), d);
}(a0, a1), 2);
};
File renamed without changes.

0 comments on commit 22fff6c

Please sign in to comment.