Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make unit.core.exe compile with MSVC #1460

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,14 @@ jobs:
cmake --build . --target unit.arch.exe --config ${{ matrix.cfg.mode }} --parallel 2
cmake --build . --target unit.meta.exe --config ${{ matrix.cfg.mode }} --parallel 2
cmake --build . --target unit.internals.exe --config ${{ matrix.cfg.mode }} --parallel 2
cmake --build . --target unit.core.exe --config ${{ matrix.cfg.mode }} --parallel 2
- name: Running Tests
run: |
cd build
ctest -C ${{ matrix.cfg.mode }} --output-on-failure -R ^unit.arch.*.exe
ctest -C ${{ matrix.cfg.mode }} --output-on-failure -R ^unit.meta.*.exe
ctest -C ${{ matrix.cfg.mode }} --output-on-failure -R ^unit.internals.*.exe
ctest -C ${{ matrix.cfg.mode }} --output-on-failure -R ^unit.core.*.exe

avx512:
runs-on: [self-hosted, avx512]
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ endif()
## =================================================================================================
if( EVE_BUILD_TEST )
include(config/dependencies)
include(CTest)
include(target/add_parent_target)
include(config/compiler)
include(config/types)
Expand Down
7 changes: 5 additions & 2 deletions test/unit/module/core/constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include "test.hpp"

#include <eve/module/core.hpp>
#include <eve/module/math/regular/exp2.hpp>

#include <limits>

TTS_CASE_TPL("Check basic constants behavior", eve::test::simd::ieee_reals)
<typename T>(tts::type<T>)
Expand All @@ -23,7 +26,7 @@ TTS_CASE_TPL("Check basic constants behavior", eve::test::simd::ieee_reals)

if constexpr( eve::floating_value<T> )
{
TTS_IEEE_EQUAL(eve::allbits(as<T>()), T(0.0 / 0.0));
TTS_IEEE_EQUAL(eve::allbits(as<T>()), T(std::numeric_limits<double>::quiet_NaN()));
TTS_EQUAL(eve::mzero(as<T>()), T(-0));
TTS_EQUAL(eve::half(as<T>()), T(0.5));
TTS_EQUAL(eve::mhalf(as<T>()), T(-0.5));
Expand All @@ -40,7 +43,7 @@ TTS_CASE_TPL("Check ieee754 constants", eve::test::simd::ieee_reals)
using ilt_t = eve::as_integer_t<elt_t>;
using i_t = eve::as_integer_t<T, signed>;
TTS_EQUAL(eve::bitincrement(as<T>()), T(eve::bit_cast(eve::one(as<ilt_t>()), as<elt_t>())));
TTS_IEEE_EQUAL(eve::nan(as<T>()), T(0.0 / 0.0));
TTS_IEEE_EQUAL(eve::nan(as<T>()), T(std::numeric_limits<double>::quiet_NaN()));
TTS_EQUAL(eve::signmask(as<T>()),
T(eve::bit_cast(eve::one(as<ilt_t>()) << (sizeof(ilt_t) * 8 - 1), as<elt_t>())));
TTS_EQUAL(eve::mindenormal(as<T>()), eve::bitincrement(as<T>()));
Expand Down
1 change: 1 addition & 0 deletions test/unit/module/core/frexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "test.hpp"

#include <eve/module/core.hpp>
#include <eve/module/math/constant/minlog2denormal.hpp>

#include <cmath>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/module/core/hi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TTS_CASE_WITH("Check behavior of hi(wide) on unsigned integral ",
{
using v_t = eve::element_type_t<T>;
using d_t = eve::detail::downgrade_t<v_t>;
constexpr int s = sizeof(v_t) * 4;
static constexpr int s = sizeof(v_t) * 4;
if constexpr( s == 4 )
{
TTS_EQUAL(eve::hi(a0), map([&](auto e) -> v_t { return d_t(eve::shr(e, s)); }, a0));
Expand Down
2 changes: 1 addition & 1 deletion test/unit/module/core/lo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TTS_CASE_WITH("Check behavior of lo(wide) on unsigned integral ",
{
using v_t = eve::element_type_t<T>;
using d_t = eve::detail::downgrade_t<v_t>;
constexpr int s = sizeof(v_t) * 4;
static constexpr int s = sizeof(v_t) * 4;
if constexpr( s == 4 )
{
TTS_EQUAL(eve::lo(a0),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/module/core/scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <eve/module/core.hpp>

#include <algorithm>
#include <numeric>
#include <array>

template<typename T, typename Op>
Expand Down