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