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
21namespace simdpp {
22namespace SIMDPP_ARCH_NAMESPACE {
23namespace detail {
24namespace insn {
25
26template<unsigned N> SIMDPP_INL uint8<N> unzip128_lo(const uint8<N>& a, const uint8<N>& b) { return unzip16_lo(a, b); }
27template<unsigned N> SIMDPP_INL uint16<N> unzip128_lo(const uint16<N>& a, const uint16<N>& b) { return unzip8_lo(a, b); }
28template<unsigned N> SIMDPP_INL uint32<N> unzip128_lo(const uint32<N>& a, const uint32<N>& b) { return unzip4_lo(a, b); }
29template<unsigned N> SIMDPP_INL uint64<N> unzip128_lo(const uint64<N>& a, const uint64<N>& b) { return unzip2_lo(a, b); }
30template<unsigned N> SIMDPP_INL float32<N> unzip128_lo(const float32<N>& a, const float32<N>& b) { return unzip4_lo(a, b); }
31template<unsigned N> SIMDPP_INL float64<N> unzip128_lo(const float64<N>& a, const float64<N>& b) { return unzip2_lo(a, b); }
32
33template<unsigned N> SIMDPP_INL uint8<N> unzip128_hi(const uint8<N>& a, const uint8<N>& b) { return unzip16_hi(a, b); }
34template<unsigned N> SIMDPP_INL uint16<N> unzip128_hi(const uint16<N>& a, const uint16<N>& b) { return unzip8_hi(a, b); }
35template<unsigned N> SIMDPP_INL uint32<N> unzip128_hi(const uint32<N>& a, const uint32<N>& b) { return unzip4_hi(a, b); }
36template<unsigned N> SIMDPP_INL uint64<N> unzip128_hi(const uint64<N>& a, const uint64<N>& b) { return unzip2_hi(a, b); }
37template<unsigned N> SIMDPP_INL float32<N> unzip128_hi(const float32<N>& a, const float32<N>& b) { return unzip4_hi(a, b); }
38template<unsigned N> SIMDPP_INL float64<N> unzip128_hi(const float64<N>& a, const float64<N>& b) { return unzip2_hi(a, b); }
39
40template<unsigned N> SIMDPP_INL uint8<N> zip128_lo(const uint8<N>& a, const uint8<N>& b) { return zip16_lo(a, b); }
41template<unsigned N> SIMDPP_INL uint16<N> zip128_lo(const uint16<N>& a, const uint16<N>& b) { return zip8_lo(a, b); }
42template<unsigned N> SIMDPP_INL uint32<N> zip128_lo(const uint32<N>& a, const uint32<N>& b) { return zip4_lo(a, b); }
43template<unsigned N> SIMDPP_INL uint64<N> zip128_lo(const uint64<N>& a, const uint64<N>& b) { return zip2_lo(a, b); }
44template<unsigned N> SIMDPP_INL float32<N> zip128_lo(const float32<N>& a, const float32<N>& b) { return zip4_lo(a, b); }
45template<unsigned N> SIMDPP_INL float64<N> zip128_lo(const float64<N>& a, const float64<N>& b) { return zip2_lo(a, b); }
46
47template<unsigned N> SIMDPP_INL uint8<N> zip128_hi(const uint8<N>& a, const uint8<N>& b) { return zip16_hi(a, b); }
48template<unsigned N> SIMDPP_INL uint16<N> zip128_hi(const uint16<N>& a, const uint16<N>& b) { return zip8_hi(a, b); }
49template<unsigned N> SIMDPP_INL uint32<N> zip128_hi(const uint32<N>& a, const uint32<N>& b) { return zip4_hi(a, b); }
50template<unsigned N> SIMDPP_INL uint64<N> zip128_hi(const uint64<N>& a, const uint64<N>& b) { return zip2_hi(a, b); }
51template<unsigned N> SIMDPP_INL float32<N> zip128_hi(const float32<N>& a, const float32<N>& b) { return zip4_hi(a, b); }
52template<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