◆ slice()

std::array<ValueO, 2> boost::simd::slice ( Value1 const &  x)

Type-preserving pack slicing.

This function object slices a simd::pack into two simd::packs of same type of half the size.

Header <boost/simd/function/slice.hpp>

For any value a of type T, the following code:

pack<T, N> x;
std::array<pack<T, N/2>, 2> res = slice(x);

returns an array type which behaves so that:

compare_equal(a, combine(c[0],c[1]));

evaluates to true.

See also
combine, slice_low, slice_high