|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// This source code is licensed under the BSD-style license found in the |
| 4 | +// LICENSE file in the root directory of this source tree. |
| 5 | + |
| 6 | +#include "ynnpack/base/simd/arm_neon.h" |
| 7 | + |
| 8 | +#include "ynnpack/base/simd/test/generic.h" |
| 9 | + |
| 10 | +namespace ynn { |
| 11 | +namespace simd { |
| 12 | + |
| 13 | +TEST_LOAD_STORE(arm_neon, u8x16, /*arch_flags=*/0); |
| 14 | +TEST_LOAD_STORE(arm_neon, s8x16, /*arch_flags=*/0); |
| 15 | +TEST_LOAD_STORE(arm_neon, s16x8, /*arch_flags=*/0); |
| 16 | +TEST_LOAD_STORE(arm_neon, f16x8, /*arch_flags=*/0); |
| 17 | +TEST_LOAD_STORE(arm_neon, bf16x8, /*arch_flags=*/0); |
| 18 | +TEST_LOAD_STORE(arm_neon, f32x4, /*arch_flags=*/0); |
| 19 | +TEST_LOAD_STORE(arm_neon, s32x4, /*arch_flags=*/0); |
| 20 | + |
| 21 | +TEST_ALIGNED_LOAD_STORE(arm_neon, u8x16, /*arch_flags=*/0); |
| 22 | +TEST_ALIGNED_LOAD_STORE(arm_neon, s8x16, /*arch_flags=*/0); |
| 23 | +TEST_ALIGNED_LOAD_STORE(arm_neon, s16x8, /*arch_flags=*/0); |
| 24 | +TEST_ALIGNED_LOAD_STORE(arm_neon, f16x8, /*arch_flags=*/0); |
| 25 | +TEST_ALIGNED_LOAD_STORE(arm_neon, bf16x8, /*arch_flags=*/0); |
| 26 | +TEST_ALIGNED_LOAD_STORE(arm_neon, f32x4, /*arch_flags=*/0); |
| 27 | +TEST_ALIGNED_LOAD_STORE(arm_neon, s32x4, /*arch_flags=*/0); |
| 28 | + |
| 29 | +TEST_PARTIAL_LOAD_STORE(arm_neon, u8x16, /*arch_flags=*/0); |
| 30 | +TEST_PARTIAL_LOAD_STORE(arm_neon, s8x16, /*arch_flags=*/0); |
| 31 | +TEST_PARTIAL_LOAD_STORE(arm_neon, s16x8, /*arch_flags=*/0); |
| 32 | +TEST_PARTIAL_LOAD_STORE(arm_neon, f16x8, /*arch_flags=*/0); |
| 33 | +TEST_PARTIAL_LOAD_STORE(arm_neon, bf16x8, /*arch_flags=*/0); |
| 34 | +TEST_PARTIAL_LOAD_STORE(arm_neon, f32x4, /*arch_flags=*/0); |
| 35 | +TEST_PARTIAL_LOAD_STORE(arm_neon, s32x4, /*arch_flags=*/0); |
| 36 | + |
| 37 | +TEST_ADD(arm_neon, u8x16, /*arch_flags=*/0); |
| 38 | +TEST_ADD(arm_neon, s8x16, /*arch_flags=*/0); |
| 39 | +TEST_ADD(arm_neon, f32x4, /*arch_flags=*/0); |
| 40 | +TEST_ADD(arm_neon, s32x4, /*arch_flags=*/0); |
| 41 | + |
| 42 | +TEST_SUBTRACT(arm_neon, u8x16, /*arch_flags=*/0); |
| 43 | +TEST_SUBTRACT(arm_neon, s8x16, /*arch_flags=*/0); |
| 44 | +TEST_SUBTRACT(arm_neon, f32x4, /*arch_flags=*/0); |
| 45 | +TEST_SUBTRACT(arm_neon, s32x4, /*arch_flags=*/0); |
| 46 | + |
| 47 | +TEST_MULTIPLY(arm_neon, u8x16, /*arch_flags=*/0); |
| 48 | +TEST_MULTIPLY(arm_neon, s8x16, /*arch_flags=*/0); |
| 49 | +TEST_MULTIPLY(arm_neon, f32x4, /*arch_flags=*/0); |
| 50 | +TEST_MULTIPLY(arm_neon, s32x4, /*arch_flags=*/0); |
| 51 | + |
| 52 | +TEST_MIN(arm_neon, u8x16, /*arch_flags=*/0); |
| 53 | +TEST_MIN(arm_neon, s8x16, /*arch_flags=*/0); |
| 54 | +TEST_MIN(arm_neon, s16x8, /*arch_flags=*/0); |
| 55 | +TEST_MIN(arm_neon, f32x4, /*arch_flags=*/0); |
| 56 | +TEST_MIN(arm_neon, s32x4, /*arch_flags=*/0); |
| 57 | + |
| 58 | +TEST_MAX(arm_neon, u8x16, /*arch_flags=*/0); |
| 59 | +TEST_MAX(arm_neon, s8x16, /*arch_flags=*/0); |
| 60 | +TEST_MAX(arm_neon, s16x8, /*arch_flags=*/0); |
| 61 | +TEST_MAX(arm_neon, f32x4, /*arch_flags=*/0); |
| 62 | +TEST_MAX(arm_neon, s32x4, /*arch_flags=*/0); |
| 63 | + |
| 64 | +TEST_HORIZONTAL_MIN(arm_neon, u8x16, /*arch_flags=*/0); |
| 65 | +TEST_HORIZONTAL_MIN(arm_neon, s8x16, /*arch_flags=*/0); |
| 66 | +TEST_HORIZONTAL_MIN(arm_neon, s16x8, /*arch_flags=*/0); |
| 67 | +TEST_HORIZONTAL_MIN(arm_neon, f32x4, /*arch_flags=*/0); |
| 68 | +TEST_HORIZONTAL_MIN(arm_neon, s32x4, /*arch_flags=*/0); |
| 69 | + |
| 70 | +TEST_HORIZONTAL_MAX(arm_neon, u8x16, /*arch_flags=*/0); |
| 71 | +TEST_HORIZONTAL_MAX(arm_neon, s8x16, /*arch_flags=*/0); |
| 72 | +TEST_HORIZONTAL_MAX(arm_neon, s16x8, /*arch_flags=*/0); |
| 73 | +TEST_HORIZONTAL_MAX(arm_neon, f32x4, /*arch_flags=*/0); |
| 74 | +TEST_HORIZONTAL_MAX(arm_neon, s32x4, /*arch_flags=*/0); |
| 75 | + |
| 76 | +} // namespace simd |
| 77 | +} // namespace ynn |
0 commit comments