Skip to content

Commit

Permalink
Fix issue with has_simd
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Aug 24, 2018
1 parent 1700aac commit 0f86b01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 12 additions & 0 deletions include/xtensor/xtensor_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <vector>

#include "xstorage.hpp"
#include "xutils.hpp"

#ifdef XTENSOR_USE_XSIMD

Expand Down Expand Up @@ -165,6 +166,17 @@ namespace xt

template <class A1, class A2>
using driven_align_mode_t = typename detail::driven_align_mode_impl<A1, A2>::type;

template <class E, class = void>
struct has_simd_interface : std::false_type
{
};

template <class E>
struct has_simd_interface<E, void_t<decltype(std::declval<E>().template load_simd<aligned_mode>(typename E::size_type(0)))>>
: std::true_type
{
};
}

#endif
11 changes: 0 additions & 11 deletions include/xtensor/xutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,17 +672,6 @@ namespace xt
{
};

template <class E, class = void>
struct has_simd_interface : std::false_type
{
};

template <class E>
struct has_simd_interface<E, void_t<decltype(std::declval<E>().template load_simd<aligned_mode>(typename E::size_type(0)))>>
: std::true_type
{
};

/******************
* enable_if_type *
******************/
Expand Down

0 comments on commit 0f86b01

Please sign in to comment.