1 | /* Copyright (C) 2013-2014 Povilas Kanapickas <povilas@radix.lt> |
2 | |
3 | Distributed under the Boost Software License, Version 1.0. |
4 | (See accompanying file LICENSE_1_0.txt or copy at |
5 | http://www.boost.org/LICENSE_1_0.txt) |
6 | */ |
7 | |
8 | #ifndef LIBSIMDPP_SIMDPP_DETAIL_INSN_ZIP128_H |
9 | #define LIBSIMDPP_SIMDPP_DETAIL_INSN_ZIP128_H |
10 | |
11 | #ifndef LIBSIMDPP_SIMD_H |
12 | #error "This file must be included through simd.h" |
13 | #endif |
14 | |
15 | #include <simdpp/types.h> |
16 | #include <simdpp/detail/insn/zip_hi.h> |
17 | #include <simdpp/detail/insn/zip_lo.h> |
18 | #include <simdpp/detail/insn/unzip_hi.h> |
19 | #include <simdpp/detail/insn/unzip_lo.h> |
20 | |
21 | namespace simdpp { |
22 | namespace SIMDPP_ARCH_NAMESPACE { |
23 | namespace detail { |
24 | namespace insn { |
25 | |
26 | template<unsigned N> SIMDPP_INL uint8<N> unzip128_lo(const uint8<N>& a, const uint8<N>& b) { return unzip16_lo(a, b); } |
27 | template<unsigned N> SIMDPP_INL uint16<N> unzip128_lo(const uint16<N>& a, const uint16<N>& b) { return unzip8_lo(a, b); } |
28 | template<unsigned N> SIMDPP_INL uint32<N> unzip128_lo(const uint32<N>& a, const uint32<N>& b) { return unzip4_lo(a, b); } |
29 | template<unsigned N> SIMDPP_INL uint64<N> unzip128_lo(const uint64<N>& a, const uint64<N>& b) { return unzip2_lo(a, b); } |
30 | template<unsigned N> SIMDPP_INL float32<N> unzip128_lo(const float32<N>& a, const float32<N>& b) { return unzip4_lo(a, b); } |
31 | template<unsigned N> SIMDPP_INL float64<N> unzip128_lo(const float64<N>& a, const float64<N>& b) { return unzip2_lo(a, b); } |
32 | |
33 | template<unsigned N> SIMDPP_INL uint8<N> unzip128_hi(const uint8<N>& a, const uint8<N>& b) { return unzip16_hi(a, b); } |
34 | template<unsigned N> SIMDPP_INL uint16<N> unzip128_hi(const uint16<N>& a, const uint16<N>& b) { return unzip8_hi(a, b); } |
35 | template<unsigned N> SIMDPP_INL uint32<N> unzip128_hi(const uint32<N>& a, const uint32<N>& b) { return unzip4_hi(a, b); } |
36 | template<unsigned N> SIMDPP_INL uint64<N> unzip128_hi(const uint64<N>& a, const uint64<N>& b) { return unzip2_hi(a, b); } |
37 | template<unsigned N> SIMDPP_INL float32<N> unzip128_hi(const float32<N>& a, const float32<N>& b) { return unzip4_hi(a, b); } |
38 | template<unsigned N> SIMDPP_INL float64<N> unzip128_hi(const float64<N>& a, const float64<N>& b) { return unzip2_hi(a, b); } |
39 | |
40 | template<unsigned N> SIMDPP_INL uint8<N> zip128_lo(const uint8<N>& a, const uint8<N>& b) { return zip16_lo(a, b); } |
41 | template<unsigned N> SIMDPP_INL uint16<N> zip128_lo(const uint16<N>& a, const uint16<N>& b) { return zip8_lo(a, b); } |
42 | template<unsigned N> SIMDPP_INL uint32<N> zip128_lo(const uint32<N>& a, const uint32<N>& b) { return zip4_lo(a, b); } |
43 | template<unsigned N> SIMDPP_INL uint64<N> zip128_lo(const uint64<N>& a, const uint64<N>& b) { return zip2_lo(a, b); } |
44 | template<unsigned N> SIMDPP_INL float32<N> zip128_lo(const float32<N>& a, const float32<N>& b) { return zip4_lo(a, b); } |
45 | template<unsigned N> SIMDPP_INL float64<N> zip128_lo(const float64<N>& a, const float64<N>& b) { return zip2_lo(a, b); } |
46 | |
47 | template<unsigned N> SIMDPP_INL uint8<N> zip128_hi(const uint8<N>& a, const uint8<N>& b) { return zip16_hi(a, b); } |
48 | template<unsigned N> SIMDPP_INL uint16<N> zip128_hi(const uint16<N>& a, const uint16<N>& b) { return zip8_hi(a, b); } |
49 | template<unsigned N> SIMDPP_INL uint32<N> zip128_hi(const uint32<N>& a, const uint32<N>& b) { return zip4_hi(a, b); } |
50 | template<unsigned N> SIMDPP_INL uint64<N> zip128_hi(const uint64<N>& a, const uint64<N>& b) { return zip2_hi(a, b); } |
51 | template<unsigned N> SIMDPP_INL float32<N> zip128_hi(const float32<N>& a, const float32<N>& b) { return zip4_hi(a, b); } |
52 | template<unsigned N> SIMDPP_INL float64<N> zip128_hi(const float64<N>& a, const float64<N>& b) { return zip2_hi(a, b); } |
53 | |
54 | } // namespace insn |
55 | } // namespace detail |
56 | } // namespace SIMDPP_ARCH_NAMESPACE |
57 | } // namespace simdpp |
58 | |
59 | #endif |
60 | |
61 | |
62 | |