Debian Codegraph @

third-party/simde/arm/neon/movn_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 */
26
27 #if !defined(SIMDE_ARM_NEON_MOVN_HIGH_H)
28 #define SIMDE_ARM_NEON_MOVN_HIGH_H
29
30 #include "types.h"
31 #include "movn.h"
32 #include "combine.h"
33
34 HEDLEY_DIAGNOSTIC_PUSH
35 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
36 SIMDE_BEGIN_DECLS_
37
38 SIMDE_FUNCTION_ATTRIBUTES
39 simde_int8x16_t
40 simde_vmovn_high_s16(simde_int8x8_t r, simde_int16x8_t a) {
41 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
42 return vmovn_high_s16(r, a);
43 #else
44 return simde_vcombine_s8(r, simde_vmovn_s16(a));
45 #endif
46 }
47 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
48 #undef vmovn_high_s16
49 #define vmovn_high_s16(r, a) simde_vmovn_high_s16((r), (a))
50 #endif
51
52 SIMDE_FUNCTION_ATTRIBUTES
53 simde_int16x8_t
54 simde_vmovn_high_s32(simde_int16x4_t r, simde_int32x4_t a) {
55 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
56 return vmovn_high_s32(r, a);
57 #else
58 return simde_vcombine_s16(r, simde_vmovn_s32(a));
59 #endif
60 }
61 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
62 #undef vmovn_high_s32
63 #define vmovn_high_s32(r, a) simde_vmovn_high_s32((r), (a))
64 #endif
65
66 SIMDE_FUNCTION_ATTRIBUTES
67 simde_int32x4_t
68 simde_vmovn_high_s64(simde_int32x2_t r, simde_int64x2_t a) {
69 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
70 return vmovn_high_s64(r, a);
71 #else
72 return simde_vcombine_s32(r, simde_vmovn_s64(a));
73 #endif
74 }
75 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
76 #undef vmovn_high_s64
77 #define vmovn_high_s64(r, a) simde_vmovn_high_s64((r), (a))
78 #endif
79
80 SIMDE_FUNCTION_ATTRIBUTES
81 simde_uint8x16_t
82 simde_vmovn_high_u16(simde_uint8x8_t r, simde_uint16x8_t a) {
83 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
84 return vmovn_high_u16(r, a);
85 #else
86 return simde_vcombine_u8(r, simde_vmovn_u16(a));
87 #endif
88 }
89 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
90 #undef vmovn_high_u16
91 #define vmovn_high_u16(r, a) simde_vmovn_high_u16((r), (a))
92 #endif
93
94 SIMDE_FUNCTION_ATTRIBUTES
95 simde_uint16x8_t
96 simde_vmovn_high_u32(simde_uint16x4_t r, simde_uint32x4_t a) {
97 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
98 return vmovn_high_u32(r, a);
99 #else
100 return simde_vcombine_u16(r, simde_vmovn_u32(a));
101 #endif
102 }
103 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
104 #undef vmovn_high_u32
105 #define vmovn_high_u32(r, a) simde_vmovn_high_u32((r), (a))
106 #endif
107
108 SIMDE_FUNCTION_ATTRIBUTES
109 simde_uint32x4_t
110 simde_vmovn_high_u64(simde_uint32x2_t r, simde_uint64x2_t a) {
111 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
112 return vmovn_high_u64(r, a);
113 #else
114 return simde_vcombine_u32(r, simde_vmovn_u64(a));
115 #endif
116 }
117 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
118 #undef vmovn_high_u64
119 #define vmovn_high_u64(r, a) simde_vmovn_high_u64((r), (a))
120 #endif
121
122 SIMDE_END_DECLS_
123 HEDLEY_DIAGNOSTIC_POP
124
125 #endif /* !defined(SIMDE_ARM_NEON_MOVN_HIGH_H) */