• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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 // Auto-generated file. Do not edit!
7 //   Specification: test/f16-vsqrdiffc.yaml
8 //   Generator: tools/generate-vbinary-test.py
9 
10 
11 #include <gtest/gtest.h>
12 
13 #include <xnnpack/common.h>
14 #include <xnnpack/isa-checks.h>
15 
16 #include <xnnpack/vbinary.h>
17 #include "vbinaryc-microkernel-tester.h"
18 
19 
20 #if XNN_ARCH_ARM64
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8,batch_eq_8)21   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8, batch_eq_8) {
22     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
23     VBinOpCMicrokernelTester()
24       .batch_size(8)
25       .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
26   }
27 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8,batch_div_8)28   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8, batch_div_8) {
29     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
30     for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
31       VBinOpCMicrokernelTester()
32         .batch_size(batch_size)
33         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
34     }
35   }
36 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8,batch_lt_8)37   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8, batch_lt_8) {
38     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
39     for (size_t batch_size = 1; batch_size < 8; batch_size++) {
40       VBinOpCMicrokernelTester()
41         .batch_size(batch_size)
42         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
43     }
44   }
45 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8,batch_gt_8)46   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8, batch_gt_8) {
47     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
48     for (size_t batch_size = 9; batch_size < 16; batch_size++) {
49       VBinOpCMicrokernelTester()
50         .batch_size(batch_size)
51         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
52     }
53   }
54 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8,inplace)55   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X8, inplace) {
56     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
57     for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
58       VBinOpCMicrokernelTester()
59         .batch_size(batch_size)
60         .inplace(true)
61         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
62     }
63   }
64 #endif  // XNN_ARCH_ARM64
65 
66 
67 #if XNN_ARCH_ARM64
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16,batch_eq_16)68   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16, batch_eq_16) {
69     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
70     VBinOpCMicrokernelTester()
71       .batch_size(16)
72       .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
73   }
74 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16,batch_div_16)75   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16, batch_div_16) {
76     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
77     for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
78       VBinOpCMicrokernelTester()
79         .batch_size(batch_size)
80         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
81     }
82   }
83 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16,batch_lt_16)84   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16, batch_lt_16) {
85     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
86     for (size_t batch_size = 1; batch_size < 16; batch_size++) {
87       VBinOpCMicrokernelTester()
88         .batch_size(batch_size)
89         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
90     }
91   }
92 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16,batch_gt_16)93   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16, batch_gt_16) {
94     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
95     for (size_t batch_size = 17; batch_size < 32; batch_size++) {
96       VBinOpCMicrokernelTester()
97         .batch_size(batch_size)
98         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
99     }
100   }
101 
TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16,inplace)102   TEST(F16_VSQRDIFFC__NEONFP16ARITH_X16, inplace) {
103     TEST_REQUIRES_ARM_NEON_FP16_ARITH;
104     for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
105       VBinOpCMicrokernelTester()
106         .batch_size(batch_size)
107         .inplace(true)
108         .Test(xnn_f16_vsqrdiffc_ukernel__neonfp16arith_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
109     }
110   }
111 #endif  // XNN_ARCH_ARM64
112