Skip to content

Commit 92ec982

Browse files
Make xsimd_scalar.hpp independent from xsimd::batch
This paves the way for cleaner error when trying to instantiate an xsimd::batch when to architecture is available. Related to #1143
1 parent eb17eaa commit 92ec982

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

include/xsimd/arch/xsimd_scalar.hpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232

3333
namespace xsimd
3434
{
35-
template <class T, class A>
36-
class batch;
37-
template <class T, class A>
38-
class batch_bool;
39-
4035
using std::abs;
4136

4237
using std::acos;
@@ -779,20 +774,6 @@ namespace xsimd
779774

780775
namespace detail
781776
{
782-
template <class T>
783-
struct value_type_or_type_helper
784-
{
785-
using type = T;
786-
};
787-
template <class T, class A>
788-
struct value_type_or_type_helper<batch<T, A>>
789-
{
790-
using type = T;
791-
};
792-
793-
template <class T>
794-
using value_type_or_type = typename value_type_or_type_helper<T>::type;
795-
796777
template <class T0, class T1>
797778
XSIMD_INLINE typename std::enable_if<std::is_integral<T1>::value, T0>::type
798779
ipow(const T0& x, const T1& n) noexcept
@@ -801,7 +782,7 @@ namespace xsimd
801782
T0 a = x;
802783
T1 b = n;
803784
bool const recip = b < 0;
804-
T0 r(static_cast<value_type_or_type<T0>>(1));
785+
T0 r(static_cast<T0>(1));
805786
while (1)
806787
{
807788
if (b & 1)

0 commit comments

Comments
 (0)