1 // Copyright 2020 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 <gtest/gtest.h>
7
8 #include "copy-operator-tester.h"
9
10
TEST(CLAMP_NC_X32,unit_batch)11 TEST(CLAMP_NC_X32, unit_batch) {
12 for (size_t channels = 1; channels < 100; channels++) {
13 CopyOperatorTester()
14 .batch_size(1)
15 .channels(channels)
16 .iterations(3)
17 .TestX32();
18 }
19 }
20
TEST(CLAMP_NC_X32,small_batch)21 TEST(CLAMP_NC_X32, small_batch) {
22 for (size_t channels = 1; channels < 100; channels++) {
23 CopyOperatorTester()
24 .batch_size(3)
25 .channels(channels)
26 .iterations(3)
27 .TestX32();
28 }
29 }
30
TEST(CLAMP_NC_X32,small_batch_with_input_stride)31 TEST(CLAMP_NC_X32, small_batch_with_input_stride) {
32 for (size_t channels = 1; channels < 100; channels += 15) {
33 CopyOperatorTester()
34 .batch_size(3)
35 .channels(channels)
36 .input_stride(129)
37 .iterations(3)
38 .TestX32();
39 }
40 }
41
TEST(CLAMP_NC_X32,small_batch_with_output_stride)42 TEST(CLAMP_NC_X32, small_batch_with_output_stride) {
43 for (size_t channels = 1; channels < 100; channels += 15) {
44 CopyOperatorTester()
45 .batch_size(3)
46 .channels(channels)
47 .output_stride(117)
48 .iterations(3)
49 .TestX32();
50 }
51 }
52
TEST(CLAMP_NC_X32,small_batch_with_input_and_output_stride)53 TEST(CLAMP_NC_X32, small_batch_with_input_and_output_stride) {
54 for (size_t channels = 1; channels < 100; channels += 15) {
55 CopyOperatorTester()
56 .batch_size(3)
57 .channels(channels)
58 .input_stride(129)
59 .output_stride(117)
60 .iterations(3)
61 .TestX32();
62 }
63 }
64