Skip to content

Commit

Permalink
Various Cmake fixes (agenium-scale#298)
Browse files Browse the repository at this point in the history
* CMake language specification so Travis doesn't freak out
* Make tests run in Release mode
* Collateral changes on testing Release mdoe
  • Loading branch information
jfalcou authored Oct 17, 2016
1 parent 20e0623 commit 257bde6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
22 changes: 19 additions & 3 deletions include/boost/simd/arch/common/simd/function/max.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,30 @@ namespace boost { namespace simd { namespace ext
, (detail::is_native<X>)
, bd::cpu_
, bs::conformant_tag
, bs::pack_<bd::arithmetic_<A0>, X>
, bs::pack_<bd::arithmetic_<A0>, X>
, bs::pack_<bd::integer_<A0>, X>
, bs::pack_<bd::integer_<A0>, 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<X>)
, bd::cpu_
, bs::conformant_tag
, bs::pack_<bd::floating_<A0>, X>
, bs::pack_<bd::floating_<A0>, 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));
Expand Down
22 changes: 19 additions & 3 deletions include/boost/simd/arch/common/simd/function/min.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,30 @@ namespace boost { namespace simd { namespace ext
, (detail::is_native<X>)
, bd::cpu_
, bs::conformant_tag
, bs::pack_<bd::arithmetic_<A0>, X>
, bs::pack_<bd::arithmetic_<A0>, X>
, bs::pack_<bd::integer_<A0>, X>
, bs::pack_<bd::integer_<A0>, 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<X>)
, bd::cpu_
, bs::conformant_tag
, bs::pack_<bd::floating_<A0>, X>
, bs::pack_<bd::floating_<A0>, 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));
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/function/simd/touint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 257bde6

Please sign in to comment.