Debian Codegraph @

third-party/simde/arm/neon/qmovn_high.h

raw
1 /* SPDX-License-Identifier: MIT
2 *
3 * Permission is hereby granted, free of charge, to any person
4 * obtaining a copy of this software and associated documentation
5 * files (the "Software"), to deal in the Software without
6 * restriction, including without limitation the rights to use, copy,
7 * modify, merge, publish, distribute, sublicense, and/or sell copies
8 * of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be
12 * included in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 * Copyright:
24 * 2020 Evan Nemerson <[email protected]>
25 * 2020 Sean Maher <[email protected]> (Copyright owned by Google, LLC)
26 */
27
28 #if !defined(SIMDE_ARM_NEON_QMOVN_HIGH_H)
29 #define SIMDE_ARM_NEON_QMOVN_HIGH_H
30
31 #include "types.h"
32
33 #include "combine.h"
34 #include "qmovn.h"
35
36 HEDLEY_DIAGNOSTIC_PUSH
37 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
38 SIMDE_BEGIN_DECLS_
39
40 SIMDE_FUNCTION_ATTRIBUTES
41 simde_int8x16_t
42 simde_vqmovn_high_s16(simde_int8x8_t r, simde_int16x8_t a) {
43 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
44 return vqmovn_high_s16(r, a);
45 #else
46 return simde_vcombine_s8(r, simde_vqmovn_s16(a));
47 #endif
48 }
49 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
50 #undef vqmovn_high_s16
51 #define vqmovn_high_s16(r, a) simde_vqmovn_high_s16((r), (a))
52 #endif
53
54 SIMDE_FUNCTION_ATTRIBUTES
55 simde_int16x8_t
56 simde_vqmovn_high_s32(simde_int16x4_t r, simde_int32x4_t a) {
57 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
58 return vqmovn_high_s32(r, a);
59 #else
60 return simde_vcombine_s16(r, simde_vqmovn_s32(a));
61 #endif
62 }
63 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
64 #undef vqmovn_high_s32
65 #define vqmovn_high_s32(r, a) simde_vqmovn_high_s32((r), (a))
66 #endif
67
68 SIMDE_FUNCTION_ATTRIBUTES
69 simde_int32x4_t
70 simde_vqmovn_high_s64(simde_int32x2_t r, simde_int64x2_t a) {
71 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
72 return vqmovn_high_s64(r, a);
73 #else
74 return simde_vcombine_s32(r, simde_vqmovn_s64(a));
75 #endif
76 }
77 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
78 #undef vqmovn_high_s64
79 #define vqmovn_high_s64(r, a) simde_vqmovn_high_s64((r), (a))
80 #endif
81
82 SIMDE_FUNCTION_ATTRIBUTES
83 simde_uint8x16_t
84 simde_vqmovn_high_u16(simde_uint8x8_t r, simde_uint16x8_t a) {
85 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
86 return vqmovn_high_u16(r, a);
87 #else
88 return simde_vcombine_u8(r, simde_vqmovn_u16(a));
89 #endif
90 }
91 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
92 #undef vqmovn_high_u16
93 #define vqmovn_high_u16(r, a) simde_vqmovn_high_u16((r), (a))
94 #endif
95
96 SIMDE_FUNCTION_ATTRIBUTES
97 simde_uint16x8_t
98 simde_vqmovn_high_u32(simde_uint16x4_t r, simde_uint32x4_t a) {
99 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
100 return vqmovn_high_u32(r, a);
101 #else
102 return simde_vcombine_u16(r, simde_vqmovn_u32(a));
103 #endif
104 }
105 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
106 #undef vqmovn_high_u32
107 #define vqmovn_high_u32(r, a) simde_vqmovn_high_u32((r), (a))
108 #endif
109
110 SIMDE_FUNCTION_ATTRIBUTES
111 simde_uint32x4_t
112 simde_vqmovn_high_u64(simde_uint32x2_t r, simde_uint64x2_t a) {
113 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
114 return vqmovn_high_u64(r, a);
115 #else
116 return simde_vcombine_u32(r, simde_vqmovn_u64(a));
117 #endif
118 }
119 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
120 #undef vqmovn_high_u64
121 #define vqmovn_high_u64(r, a) simde_vqmovn_high_u64((r), (a))
122 #endif
123
124 SIMDE_END_DECLS_
125 HEDLEY_DIAGNOSTIC_POP
126
127 #endif /* !defined(SIMDE_ARM_NEON_QMOVN_HIGH_H) */