diff --git a/CMakeLists.txt b/CMakeLists.txt index d6a7ac0a9..e58fa2d45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 2.8.7) ## Setup project ## ------------------------------------------------------------------------------------------------- -project(Boost.SIMD CXX) +project(Boost.SIMD) set(PROJECT_VERSION 4.16.9.0) # TODO: Find a way to update this automatically set(PROJECT_DOC_DIR ${PROJECT_SOURCE_DIR}/doc) diff --git a/include/boost/simd/arch/common/simd/function/max.hpp b/include/boost/simd/arch/common/simd/function/max.hpp index 1ca38d62f..b4b95cc2e 100644 --- a/include/boost/simd/arch/common/simd/function/max.hpp +++ b/include/boost/simd/arch/common/simd/function/max.hpp @@ -40,14 +40,30 @@ namespace boost { namespace simd { namespace ext , (detail::is_native) , bd::cpu_ , bs::conformant_tag - , bs::pack_, X> - , bs::pack_, X> + , bs::pack_, X> + , bs::pack_, X> + ) + { + BOOST_FORCEINLINE A0 operator()( conformant_tag const& + , const A0& a0, const A0& a1) const BOOST_NOEXCEPT + { + return bs::max(a0, a1); + } + }; + + BOOST_DISPATCH_OVERLOAD_IF( max_ + , (typename A0, typename X) + , (detail::is_native) + , bd::cpu_ + , bs::conformant_tag + , bs::pack_, X> + , bs::pack_, X> ) { BOOST_FORCEINLINE A0 operator()( conformant_tag const& , const A0& a0, const A0& a1) const BOOST_NOEXCEPT { - #if BOOST_COMP_CLANG || (BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(5,0,0)) + #if BOOST_COMP_CLANG return bs::max(a0, a1); #else return if_else(is_nan(a1), a0, bs::max(a0, a1)); diff --git a/include/boost/simd/arch/common/simd/function/min.hpp b/include/boost/simd/arch/common/simd/function/min.hpp index 7b75875fd..8f8563369 100644 --- a/include/boost/simd/arch/common/simd/function/min.hpp +++ b/include/boost/simd/arch/common/simd/function/min.hpp @@ -39,14 +39,30 @@ namespace boost { namespace simd { namespace ext , (detail::is_native) , bd::cpu_ , bs::conformant_tag - , bs::pack_, X> - , bs::pack_, X> + , bs::pack_, X> + , bs::pack_, X> + ) + { + BOOST_FORCEINLINE A0 operator()( conformant_tag const& + , const A0& a0, const A0& a1) const BOOST_NOEXCEPT + { + return bs::min(a0, a1); + } + }; + + BOOST_DISPATCH_OVERLOAD_IF( min_ + , (typename A0, typename X) + , (detail::is_native) + , bd::cpu_ + , bs::conformant_tag + , bs::pack_, X> + , bs::pack_, X> ) { BOOST_FORCEINLINE A0 operator()( conformant_tag const& , const A0& a0, const A0& a1) const BOOST_NOEXCEPT { - #if BOOST_COMP_CLANG || (BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(5,0,0)) + #if BOOST_COMP_CLANG return bs::min(a0, a1); #else return if_else(is_nan(a1), a0, bs::min(a0, a1)); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 06284aefd..1a64d3ad3 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,7 +9,7 @@ NS_include(make_unit) NS_include(make_coverage) -set(CMAKE_BUILD_TYPE "Debug") +set(CMAKE_BUILD_TYPE "Release") ## Add all test folders add_subdirectory(api) diff --git a/test/function/simd/touint.cpp b/test/function/simd/touint.cpp index ef3af2938..9b554c5c3 100644 --- a/test/function/simd/touint.cpp +++ b/test/function/simd/touint.cpp @@ -25,8 +25,8 @@ void test(Env& $) iT b[N]; for(int i = 0; i < N; ++i) { - a1[i] =T(i); - b[i] = bs::touint(a1[i]) ; + a1[i] = T(i); + b[i] = iT(i); } p_t aa1(&a1[0], &a1[0]+N); i_t bb (&b[0], &b[0]+N);