Debian Codegraph @

third-party/simde/arm/neon/qdmulh_n.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 Zhi An Ng <[email protected]> (Copyright owned by Google, LLC)
25 */
26
27 #if !defined(SIMDE_ARM_NEON_QDMULH_N_H)
28 #define SIMDE_ARM_NEON_QDMULH_N_H
29
30 #include "qdmulh.h"
31 #include "dup_n.h"
32
33 HEDLEY_DIAGNOSTIC_PUSH
34 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
35 SIMDE_BEGIN_DECLS_
36
37 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
38 #define simde_vqdmulh_n_s16(a, b) vqdmulh_n_s16((a), (b))
39 #else
40 #define simde_vqdmulh_n_s16(a, b) simde_vqdmulh_s16((a), simde_vdup_n_s16(b))
41 #endif
42 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
43 #undef vqdmulh_n_s16
44 #define vqdmulh_n_s16(a, b) simde_vqdmulh_n_s16((a), (b))
45 #endif
46
47 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
48 #define simde_vqdmulh_n_s32(a, b) vqdmulh_n_s32((a), (b))
49 #else
50 #define simde_vqdmulh_n_s32(a, b) simde_vqdmulh_s32((a), simde_vdup_n_s32(b))
51 #endif
52 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
53 #undef vqdmulh_n_s32
54 #define vqdmulh_n_s32(a, b) simde_vqdmulh_n_s32((a), (b))
55 #endif
56
57 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
58 #define simde_vqdmulhq_n_s16(a, b) vqdmulhq_n_s16((a), (b))
59 #else
60 #define simde_vqdmulhq_n_s16(a, b) simde_vqdmulhq_s16((a), simde_vdupq_n_s16(b))
61 #endif
62 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
63 #undef vqdmulhq_n_s16
64 #define vqdmulhq_n_s16(a, b) simde_vqdmulhq_n_s16((a), (b))
65 #endif
66
67 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
68 #define simde_vqdmulhq_n_s32(a, b) vqdmulhq_n_s32((a), (b))
69 #else
70 #define simde_vqdmulhq_n_s32(a, b) simde_vqdmulhq_s32((a), simde_vdupq_n_s32(b))
71 #endif
72 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
73 #undef vqdmulhq_n_s32
74 #define vqdmulhq_n_s32(a, b) simde_vqdmulhq_n_s32((a), (b))
75 #endif
76
77 SIMDE_END_DECLS_
78 HEDLEY_DIAGNOSTIC_POP
79
80 #endif /* !defined(SIMDE_ARM_NEON_QDMULH_N_H) */