@@ -282,6 +282,12 @@ namespace xsimd
282282 template <class X >
283283 batch_type_t <X> select (const typename simd_batch_traits<X>::batch_bool_type& cond, const simd_base<X>& a, const simd_base<X>& b);
284284
285+ template <class X >
286+ batch_type_t <X> zip_lo (const simd_base<X>& lhs, const simd_base<X>& rhs);
287+
288+ template <class X >
289+ batch_type_t <X> zip_hi (const simd_base<X>& lhs, const simd_base<X>& rhs);
290+
285291 template <class X >
286292 typename simd_batch_traits<X>::batch_bool_type
287293 isnan (const simd_base<X>& x);
@@ -1777,6 +1783,36 @@ namespace xsimd
17771783 return kernel::select (cond, a (), b ());
17781784 }
17791785
1786+ /* *
1787+ * Unpack and interleave data from the LOW half of batches \c lhs and \c rhs.
1788+ * Store the results in the Return value.
1789+ * @param lhs a batch of integer or floating point or double precision values.
1790+ * @param rhs a batch of integer or floating point or double precision values.
1791+ * @return a batch of the low part of shuffled values.
1792+ */
1793+ template <class X >
1794+ inline batch_type_t <X> zip_lo (const simd_base<X>& lhs, const simd_base<X>& rhs)
1795+ {
1796+ using value_type = typename simd_batch_traits<X>::value_type;
1797+ using kernel = detail::batch_kernel<value_type, simd_batch_traits<X>::size>;
1798+ return kernel::zip_lo (lhs (), rhs ());
1799+ }
1800+
1801+ /* *
1802+ * Unpack and interleave data from the HIGH half of batches \c lhs and \c rhs.
1803+ * Store the results in the Return value.
1804+ * @param lhs a batch of integer or floating point or double precision values.
1805+ * @param rhs a batch of integer or floating point or double precision values.
1806+ * @return a batch of the high part of shuffled values.
1807+ */
1808+ template <class X >
1809+ inline batch_type_t <X> zip_hi (const simd_base<X>& lhs, const simd_base<X>& rhs)
1810+ {
1811+ using value_type = typename simd_batch_traits<X>::value_type;
1812+ using kernel = detail::batch_kernel<value_type, simd_batch_traits<X>::size>;
1813+ return kernel::zip_hi (lhs (), rhs ());
1814+ }
1815+
17801816 /* *
17811817 * Determines if the scalars in the given batch \c x are NaN values.
17821818 * @param x batch of floating point values.
0 commit comments