| 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_ADDL_HIGH_H) |
| 29 |
#define SIMDE_ARM_NEON_ADDL_HIGH_H |
| 30 |
|
| 31 |
#include "add.h" |
| 32 |
#include "movl.h" |
| 33 |
#include "movl_high.h" |
| 34 |
#include "types.h" |
| 35 |
|
| 36 |
HEDLEY_DIAGNOSTIC_PUSH |
| 37 |
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS |
| 38 |
SIMDE_BEGIN_DECLS_ |
| 39 |
|
| 40 |
SIMDE_FUNCTION_ATTRIBUTES |
| 41 |
simde_int16x8_t |
| 42 |
simde_vaddl_high_s8(simde_int8x16_t a, simde_int8x16_t b) { |
| 43 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 44 |
return vaddl_high_s8(a, b); |
| 45 |
#else |
| 46 |
return simde_vaddq_s16(simde_vmovl_high_s8(a), simde_vmovl_high_s8(b)); |
| 47 |
#endif |
| 48 |
} |
| 49 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 50 |
#undef vaddl_high_s8 |
| 51 |
#define vaddl_high_s8(a, b) simde_vaddl_high_s8((a), (b)) |
| 52 |
#endif |
| 53 |
|
| 54 |
SIMDE_FUNCTION_ATTRIBUTES |
| 55 |
simde_int32x4_t |
| 56 |
simde_vaddl_high_s16(simde_int16x8_t a, simde_int16x8_t b) { |
| 57 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 58 |
return vaddl_high_s16(a, b); |
| 59 |
#else |
| 60 |
return simde_vaddq_s32(simde_vmovl_high_s16(a), simde_vmovl_high_s16(b)); |
| 61 |
#endif |
| 62 |
} |
| 63 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 64 |
#undef vaddl_high_s16 |
| 65 |
#define vaddl_high_s16(a, b) simde_vaddl_high_s16((a), (b)) |
| 66 |
#endif |
| 67 |
|
| 68 |
SIMDE_FUNCTION_ATTRIBUTES |
| 69 |
simde_int64x2_t |
| 70 |
simde_vaddl_high_s32(simde_int32x4_t a, simde_int32x4_t b) { |
| 71 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 72 |
return vaddl_high_s32(a, b); |
| 73 |
#else |
| 74 |
return simde_vaddq_s64(simde_vmovl_high_s32(a), simde_vmovl_high_s32(b)); |
| 75 |
#endif |
| 76 |
} |
| 77 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 78 |
#undef vaddl_high_s32 |
| 79 |
#define vaddl_high_s32(a, b) simde_vaddl_high_s32((a), (b)) |
| 80 |
#endif |
| 81 |
|
| 82 |
SIMDE_FUNCTION_ATTRIBUTES |
| 83 |
simde_uint16x8_t |
| 84 |
simde_vaddl_high_u8(simde_uint8x16_t a, simde_uint8x16_t b) { |
| 85 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 86 |
return vaddl_high_u8(a, b); |
| 87 |
#else |
| 88 |
return simde_vaddq_u16(simde_vmovl_high_u8(a), simde_vmovl_high_u8(b)); |
| 89 |
#endif |
| 90 |
} |
| 91 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 92 |
#undef vaddl_high_u8 |
| 93 |
#define vaddl_high_u8(a, b) simde_vaddl_high_u8((a), (b)) |
| 94 |
#endif |
| 95 |
|
| 96 |
SIMDE_FUNCTION_ATTRIBUTES |
| 97 |
simde_uint32x4_t |
| 98 |
simde_vaddl_high_u16(simde_uint16x8_t a, simde_uint16x8_t b) { |
| 99 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 100 |
return vaddl_high_u16(a, b); |
| 101 |
#else |
| 102 |
return simde_vaddq_u32(simde_vmovl_high_u16(a), simde_vmovl_high_u16(b)); |
| 103 |
#endif |
| 104 |
} |
| 105 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 106 |
#undef vaddl_high_u16 |
| 107 |
#define vaddl_high_u16(a, b) simde_vaddl_high_u16((a), (b)) |
| 108 |
#endif |
| 109 |
|
| 110 |
SIMDE_FUNCTION_ATTRIBUTES |
| 111 |
simde_uint64x2_t |
| 112 |
simde_vaddl_high_u32(simde_uint32x4_t a, simde_uint32x4_t b) { |
| 113 |
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) |
| 114 |
return vaddl_high_u32(a, b); |
| 115 |
#else |
| 116 |
return simde_vaddq_u64(simde_vmovl_high_u32(a), simde_vmovl_high_u32(b)); |
| 117 |
#endif |
| 118 |
} |
| 119 |
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES) |
| 120 |
#undef vaddl_high_u32 |
| 121 |
#define vaddl_high_u32(a, b) simde_vaddl_high_u32((a), (b)) |
| 122 |
#endif |
| 123 |
|
| 124 |
SIMDE_END_DECLS_ |
| 125 |
HEDLEY_DIAGNOSTIC_POP |
| 126 |
|
| 127 |
#endif /* !defined(SIMDE_ARM_NEON_ADDL_HIGH_H) */ |