Skip to content
Open
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
Empty file removed docs/source/build.rst
Empty file.
8 changes: 3 additions & 5 deletions include/xsimd/arch/common/xsimd_common_details.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,11 @@ namespace xsimd
using type = with_slow_conversion;
};

using xsimd::detail::void_t;

template <class A, class From, class To>
struct conversion_type_impl<A, From, To,
void_t<decltype(fast_cast(std::declval<const batch<From, A>&>(),
std::declval<const batch<To, A>&>(),
std::declval<const A&>()))>>
std::void_t<decltype(fast_cast(std::declval<const batch<From, A>&>(),
std::declval<const batch<To, A>&>(),
std::declval<const A&>()))>>
{
using type = with_fast_conversion;
};
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/memory/xsimd_alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace xsimd
};

template <class C>
struct container_alignment<C, detail::void_t<typename C::allocator_type>>
struct container_alignment<C, std::void_t<typename C::allocator_type>>
{
using type = allocator_alignment_t<typename C::allocator_type>;
};
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/types/xsimd_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ namespace xsimd
template <class Arch, class Batch, class BatchConstant>
struct has_bitwise_lshift_batch_const<
Arch, Batch, BatchConstant,
void_t<decltype(kernel::bitwise_lshift<Arch>(
std::void_t<decltype(kernel::bitwise_lshift<Arch>(
std::declval<Batch>(), std::declval<BatchConstant>(), Arch {}))>>
: std::true_type
{
Expand Down
49 changes: 5 additions & 44 deletions include/xsimd/types/xsimd_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ namespace xsimd
inline To bit_cast(From val) noexcept
{
static_assert(sizeof(From) == sizeof(To), "casting between compatible layout");
// FIXME: Some old version of GCC don't support that trait
// static_assert(std::is_trivially_copyable<From>::value, "input type is trivially copyable");
// static_assert(std::is_trivially_copyable<To>::value, "output type is trivially copyable");
static_assert(std::is_trivially_copyable<From>::value, "input type is trivially copyable");
static_assert(std::is_trivially_copyable<To>::value, "output type is trivially copyable");
To res;
std::memcpy(&res, &val, sizeof(val));
return res;
Expand Down Expand Up @@ -255,19 +254,13 @@ namespace xsimd
} // namespace detail
} // namespace kernel

/*****************************************
* Backport of index_sequence from c++14 *
*****************************************/
/********************************************
* int_sequence and make_sequence_as_bactch *

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo :-)

********************************************/

// TODO: Remove this once we drop C++11 support
namespace detail
{
template <typename T>
struct identity
{
using type = T;
};

template <int... Is>
using int_sequence = std::integer_sequence<int, Is...>;

Expand All @@ -291,38 +284,6 @@ namespace xsimd
}
}

/*********************************
* Backport of void_t from C++17 *
*********************************/

namespace detail
{
template <class... T>
struct make_void
{
using type = void;
};

template <class... T>
using void_t = typename make_void<T...>::type;
}

/**************************************************
* Equivalent of void_t but with size_t parameter *
**************************************************/

namespace detail
{
template <std::size_t>
struct check_size
{
using type = void;
};

template <std::size_t S>
using check_size_t = typename check_size<S>::type;
}

/*****************************************
* Supplementary std::array constructors *
*****************************************/
Expand Down
Loading