Debian Codegraph @

third-party/simde/arm/neon/subl_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 * 2021 Décio Luiz Gazzoni Filho <[email protected]>
25 */
26
27 #if !defined(SIMDE_ARM_NEON_SUBL_HIGH_H)
28 #define SIMDE_ARM_NEON_SUBL_HIGH_H
29
30 #include "sub.h"
31 #include "movl.h"
32 #include "movl_high.h"
33 #include "types.h"
34
35 HEDLEY_DIAGNOSTIC_PUSH
36 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
37 SIMDE_BEGIN_DECLS_
38
39 SIMDE_FUNCTION_ATTRIBUTES
40 simde_int16x8_t
41 simde_vsubl_high_s8(simde_int8x16_t a, simde_int8x16_t b) {
42 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
43 return vsubl_high_s8(a, b);
44 #else
45 return simde_vsubq_s16(simde_vmovl_high_s8(a), simde_vmovl_high_s8(b));
46 #endif
47 }
48 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
49 #undef vsubl_high_s8
50 #define vsubl_high_s8(a, b) simde_vsubl_high_s8((a), (b))
51 #endif
52
53 SIMDE_FUNCTION_ATTRIBUTES
54 simde_int32x4_t
55 simde_vsubl_high_s16(simde_int16x8_t a, simde_int16x8_t b) {
56 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
57 return vsubl_high_s16(a, b);
58 #else
59 return simde_vsubq_s32(simde_vmovl_high_s16(a), simde_vmovl_high_s16(b));
60 #endif
61 }
62 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
63 #undef vsubl_high_s16
64 #define vsubl_high_s16(a, b) simde_vsubl_high_s16((a), (b))
65 #endif
66
67 SIMDE_FUNCTION_ATTRIBUTES
68 simde_int64x2_t
69 simde_vsubl_high_s32(simde_int32x4_t a, simde_int32x4_t b) {
70 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
71 return vsubl_high_s32(a, b);
72 #else
73 return simde_vsubq_s64(simde_vmovl_high_s32(a), simde_vmovl_high_s32(b));
74 #endif
75 }
76 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
77 #undef vsubl_high_s32
78 #define vsubl_high_s32(a, b) simde_vsubl_high_s32((a), (b))
79 #endif
80
81 SIMDE_FUNCTION_ATTRIBUTES
82 simde_uint16x8_t
83 simde_vsubl_high_u8(simde_uint8x16_t a, simde_uint8x16_t b) {
84 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
85 return vsubl_high_u8(a, b);
86 #else
87 return simde_vsubq_u16(simde_vmovl_high_u8(a), simde_vmovl_high_u8(b));
88 #endif
89 }
90 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
91 #undef vsubl_high_u8
92 #define vsubl_high_u8(a, b) simde_vsubl_high_u8((a), (b))
93 #endif
94
95 SIMDE_FUNCTION_ATTRIBUTES
96 simde_uint32x4_t
97 simde_vsubl_high_u16(simde_uint16x8_t a, simde_uint16x8_t b) {
98 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
99 return vsubl_high_u16(a, b);
100 #else
101 return simde_vsubq_u32(simde_vmovl_high_u16(a), simde_vmovl_high_u16(b));
102 #endif
103 }
104 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
105 #undef vsubl_high_u16
106 #define vsubl_high_u16(a, b) simde_vsubl_high_u16((a), (b))
107 #endif
108
109 SIMDE_FUNCTION_ATTRIBUTES
110 simde_uint64x2_t
111 simde_vsubl_high_u32(simde_uint32x4_t a, simde_uint32x4_t b) {
112 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
113 return vsubl_high_u32(a, b);
114 #else
115 return simde_vsubq_u64(simde_vmovl_high_u32(a), simde_vmovl_high_u32(b));
116 #endif
117 }
118 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
119 #undef vsubl_high_u32
120 #define vsubl_high_u32(a, b) simde_vsubl_high_u32((a), (b))
121 #endif
122
123 SIMDE_END_DECLS_
124 HEDLEY_DIAGNOSTIC_POP
125
126 #endif /* !defined(SIMDE_ARM_NEON_SUBL_HIGH_H) */