Skip to content
Merged
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
21 changes: 1 addition & 20 deletions include/xsimd/arch/xsimd_scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@

namespace xsimd
{
template <class T, class A>
class batch;
template <class T, class A>
class batch_bool;

using std::abs;

using std::acos;
Expand Down Expand Up @@ -779,20 +774,6 @@ namespace xsimd

namespace detail
{
template <class T>
struct value_type_or_type_helper
{
using type = T;
};
template <class T, class A>
struct value_type_or_type_helper<batch<T, A>>
{
using type = T;
};

template <class T>
using value_type_or_type = typename value_type_or_type_helper<T>::type;

template <class T0, class T1>
XSIMD_INLINE typename std::enable_if<std::is_integral<T1>::value, T0>::type
ipow(const T0& x, const T1& n) noexcept
Expand All @@ -801,7 +782,7 @@ namespace xsimd
T0 a = x;
T1 b = n;
bool const recip = b < 0;
T0 r(static_cast<value_type_or_type<T0>>(1));
T0 r(static_cast<T0>(1));
while (1)
{
if (b & 1)
Expand Down
11 changes: 10 additions & 1 deletion include/xsimd/xsimd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@
#include "memory/xsimd_aligned_allocator.hpp"

#if defined(XSIMD_NO_SUPPORTED_ARCHITECTURE)
// to type definition or anything appart from scalar definition and aligned allocator
// no type definition or anything apart from scalar definition and aligned allocator
namespace xsimd
{
template <class T, class A = void>
class batch
{
static constexpr bool supported_architecture = sizeof(A*) == 0; // type-dependant but always false
static_assert(supported_architecture, "No SIMD architecture detected, cannot instantiate a batch");
};
}
#else
#include "types/xsimd_batch.hpp"
#include "types/xsimd_batch_constant.hpp"
Expand Down