29 #if defined(__aarch64__)
34 void a64_fp32_nhwc_max_2x2_s1_output2x2_depthfirst_impl(
35 const unsigned int n_channels,
36 const float *
const *
const inptrs,
37 float *
const *
const outptrs,
38 const bool exclude_padding,
39 const unsigned int pad_left,
40 const unsigned int pad_top,
41 const unsigned int pad_right,
42 const unsigned int pad_bottom
47 const uint64_t n_channels;
48 const float *
const *
const inptrs;
49 float *
const *
const outptrs;
51 unsigned int channels,
52 const float *
const *input_ptrs,
53 float *
const * output_ptrs,
54 bool,
unsigned int,
unsigned int,
unsigned int,
unsigned int
55 ) : n_channels(channels),
62 const KernelArgs
args(n_channels, inptrs, outptrs, exclude_padding,
63 pad_left, pad_top, pad_right, pad_bottom);
66 "ldr x16, [%x[args], %[offsetof_n_channels]]\n"
67 "ldr x21, [%x[args], %[offsetof_outptrs]]\n"
70 "ldr x20, [%x[args], %[offsetof_inptrs]]\n"
71 "ldp x14, x13, [x21, #0x0]\n"
73 "ldp x11, x10, [x21, #0x10]\n"
74 "ldp x9, x28, [x20, #0x0]\n"
75 "ldp x27, x26, [x20, #0x10]\n"
76 "ldp x25, x24, [x20, #0x20]\n"
77 "ldp x23, x22, [x20, #0x30]\n"
78 "ldr x21, [x20, #0x40]\n"
80 "ldr q30, [x28, x15]\n"
81 "ldr q29, [x25, x15]\n"
82 "lsr x20, x16, #0x2\n"
83 "sub x16, x16, x20, LSL #2\n"
84 "ldr q28, [x22, x15]\n"
85 "ldr q27, [x26, x15]\n"
86 "subs x20, x20, #0x1\n"
87 "ldr q26, [x9, x15]\n"
88 "ldr q25, [x27, x15]\n"
89 "ldr q24, [x24, x15]\n"
90 "ldr q23, [x23, x15]\n"
91 "ldr q22, [x21, x15]\n"
92 "add x15, x15, #0x10\n"
95 "fmax v21.4s, v30.4s, v29.4s\n"
96 "ldr q30, [x28, x15]\n"
97 "fmax v20.4s, v29.4s, v28.4s\n"
98 "ldr q29, [x25, x15]\n"
99 "ldr q28, [x22, x15]\n"
100 "fmax v19.4s, v27.4s, v26.4s\n"
101 "ldr q26, [x9, x15]\n"
102 "fmax v18.4s, v25.4s, v24.4s\n"
103 "ldr q25, [x27, x15]\n"
104 "fmax v17.4s, v27.4s, v23.4s\n"
105 "ldr q27, [x26, x15]\n"
106 "fmax v16.4s, v24.4s, v22.4s\n"
107 "ldr q24, [x24, x15]\n"
108 "ldr q23, [x23, x15]\n"
109 "subs x20, x20, #0x1\n"
110 "fmax v19.4s, v21.4s, v19.4s\n"
111 "ldr q22, [x21, x15]\n"
112 "fmax v18.4s, v18.4s, v21.4s\n"
113 "fmax v17.4s, v17.4s, v20.4s\n"
114 "add x15, x15, #0x10\n"
115 "fmax v16.4s, v20.4s, v16.4s\n"
116 "str q19, [x14, x12]\n"
117 "str q18, [x13, x12]\n"
118 "str q17, [x11, x12]\n"
119 "str q16, [x10, x12]\n"
120 "add x12, x12, #0x10\n"
123 "fmax v21.4s, v30.4s, v29.4s\n"
124 "fmax v20.4s, v29.4s, v28.4s\n"
125 "fmax v16.4s, v27.4s, v26.4s\n"
126 "fmax v18.4s, v25.4s, v24.4s\n"
127 "fmax v17.4s, v27.4s, v23.4s\n"
128 "fmax v19.4s, v24.4s, v22.4s\n"
129 "fmax v16.4s, v21.4s, v16.4s\n"
130 "fmax v18.4s, v18.4s, v21.4s\n"
131 "str q16, [x14, x12]\n"
132 "fmax v17.4s, v17.4s, v20.4s\n"
133 "fmax v16.4s, v20.4s, v19.4s\n"
134 "str q18, [x13, x12]\n"
135 "str q17, [x11, x12]\n"
136 "str q16, [x10, x12]\n"
137 "add x12, x12, #0x10\n"
140 "ldr s16, [x28, x15]\n"
141 "ldr s17, [x25, x15]\n"
142 "fmax v23.4s, v16.4s, v17.4s\n"
143 "subs x16, x16, #0x1\n"
144 "ldr s16, [x22, x15]\n"
145 "ldr s22, [x26, x15]\n"
146 "fmax v21.4s, v17.4s, v16.4s\n"
147 "ldr s16, [x9, x15]\n"
148 "ldr s17, [x27, x15]\n"
149 "fmax v16.4s, v22.4s, v16.4s\n"
150 "fmax v20.4s, v23.4s, v16.4s\n"
151 "ldr s19, [x24, x15]\n"
152 "ldr s16, [x23, x15]\n"
153 "fmax v18.4s, v17.4s, v19.4s\n"
154 "fmax v17.4s, v22.4s, v16.4s\n"
155 "ldr s16, [x21, x15]\n"
156 "fmax v16.4s, v19.4s, v16.4s\n"
157 "add x15, x15, #0x4\n"
158 "fmax v18.4s, v18.4s, v23.4s\n"
159 "fmax v17.4s, v17.4s, v21.4s\n"
160 "fmax v16.4s, v21.4s, v16.4s\n"
161 "str s20, [x14, x12]\n"
162 "str s18, [x13, x12]\n"
163 "str s17, [x11, x12]\n"
164 "str s16, [x10, x12]\n"
165 "add x12, x12, #0x4\n"
169 : [
args]
"r" (&
args), [offsetof_inptrs]
"I" (offsetof(KernelArgs, inptrs)), [offsetof_n_channels]
"I" (offsetof(KernelArgs, n_channels)), [offsetof_outptrs]
"I" (offsetof(KernelArgs, outptrs))
170 :
"cc",
"memory",
"v16",
"v17",
"v18",
"v19",
"v20",
"v21",
"v22",
"v23",
"v24",
"v25",
"v26",
"v27",
"v28",
"v29",
"v30",
"x9",
"x10",
"x11",
"x12",
"x13",
"x14",
"x15",
"x16",
"x20",
"x21",
"x22",
"x23",
"x24",
"x25",
"x26",
"x27",
"x28"
177 #endif // defined(__aarch64__)