1/* Copyright (C) 2011-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_I_SHIFT_H
9#define LIBSIMDPP_SIMDPP_DETAIL_INSN_I_SHIFT_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
17// this file contains forward declarations of shift functions for internal use
18// from within shift implementation
19
20namespace simdpp {
21namespace SIMDPP_ARCH_NAMESPACE {
22
23template<unsigned N, class E> SIMDPP_INL
24uint8<N,expr_empty> shift_l(const uint8<N,E>& a, unsigned count);
25template<unsigned N, class E> SIMDPP_INL
26uint16<N,expr_empty> shift_l(const uint16<N,E>& a, unsigned count);
27template<unsigned N, class E> SIMDPP_INL
28uint32<N,expr_empty> shift_l(const uint32<N,E>& a, unsigned count);
29template<unsigned N, class E> SIMDPP_INL
30uint64<N,expr_empty> shift_l(const uint64<N,E>& a, unsigned count);
31
32template<unsigned N, class E> SIMDPP_INL
33uint8<N,expr_empty> shift_l(const uint8<N,E>& a, const uint8<N,E>& count);
34template<unsigned N, class E> SIMDPP_INL
35uint16<N,expr_empty> shift_l(const uint16<N,E>& a, const uint16<N,E>& count);
36template<unsigned N, class E> SIMDPP_INL
37uint32<N,expr_empty> shift_l(const uint32<N,E>& a, const uint32<N,E>& count);
38
39template<unsigned count, unsigned N, class E> SIMDPP_INL
40uint8<N,expr_empty> shift_l(const uint8<N,E>& a);
41template<unsigned count, unsigned N, class E> SIMDPP_INL
42uint16<N,expr_empty> shift_l(const uint16<N,E>& a);
43template<unsigned count, unsigned N, class E> SIMDPP_INL
44uint32<N,expr_empty> shift_l(const uint32<N,E>& a);
45template<unsigned count, unsigned N, class E> SIMDPP_INL
46uint64<N,expr_empty> shift_l(const uint64<N,E>& a);
47
48template<unsigned N, class E> SIMDPP_INL
49int8<N,expr_empty> shift_r(const int8<N,E>& a, unsigned count);
50template<unsigned N, class E> SIMDPP_INL
51int16<N,expr_empty> shift_r(const int16<N,E>& a, unsigned count);
52template<unsigned N, class E> SIMDPP_INL
53int32<N,expr_empty> shift_r(const int32<N,E>& a, unsigned count);
54template<unsigned N, class E> SIMDPP_INL
55int64<N,expr_empty> shift_r(const int64<N,E>& a, unsigned count);
56
57template<unsigned N, class E> SIMDPP_INL
58int8<N,expr_empty> shift_r(const int8<N,E>& a, const uint8<N,E>& count);
59template<unsigned N, class E> SIMDPP_INL
60int16<N,expr_empty> shift_r(const int16<N,E>& a, const uint16<N,E>& count);
61template<unsigned N, class E> SIMDPP_INL
62int32<N,expr_empty> shift_r(const int32<N,E>& a, const uint32<N,E>& count);
63
64template<unsigned count, unsigned N, class E> SIMDPP_INL
65int8<N,expr_empty> shift_r(const int8<N,E>& a);
66template<unsigned count, unsigned N, class E> SIMDPP_INL
67int16<N,expr_empty> shift_r(const int16<N,E>& a);
68template<unsigned count, unsigned N, class E> SIMDPP_INL
69int32<N,expr_empty> shift_r(const int32<N,E>& a);
70template<unsigned count, unsigned N, class E> SIMDPP_INL
71int64<N,expr_empty> shift_r(const int64<N,E>& a);
72
73template<unsigned N, class E> SIMDPP_INL
74uint8<N,expr_empty> shift_r(const uint8<N,E>& a, unsigned count);
75template<unsigned N, class E> SIMDPP_INL
76uint16<N,expr_empty> shift_r(const uint16<N,E>& a, unsigned count);
77template<unsigned N, class E> SIMDPP_INL
78uint32<N,expr_empty> shift_r(const uint32<N,E>& a, unsigned count);
79template<unsigned N, class E> SIMDPP_INL
80uint64<N,expr_empty> shift_r(const uint64<N,E>& a, unsigned count);
81
82template<unsigned N, class E> SIMDPP_INL
83uint8<N,expr_empty> shift_r(const uint8<N,E>& a, const uint8<N,E>& count);
84template<unsigned N, class E> SIMDPP_INL
85uint16<N,expr_empty> shift_r(const uint16<N,E>& a, const uint16<N,E>& count);
86template<unsigned N, class E> SIMDPP_INL
87uint32<N,expr_empty> shift_r(const uint32<N,E>& a, const uint32<N,E>& count);
88
89template<unsigned count, unsigned N, class E> SIMDPP_INL
90uint8<N,expr_empty> shift_r(const uint8<N,E>& a);
91template<unsigned count, unsigned N, class E> SIMDPP_INL
92uint16<N,expr_empty> shift_r(const uint16<N,E>& a);
93template<unsigned count, unsigned N, class E> SIMDPP_INL
94uint32<N,expr_empty> shift_r(const uint32<N,E>& a);
95template<unsigned count, unsigned N, class E> SIMDPP_INL
96uint64<N,expr_empty> shift_r(const uint64<N,E>& a);
97
98} // namespace SIMDPP_ARCH_NAMESPACE
99} // namespace simdpp
100
101#endif
102
103