MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / run

Method run

src/runtime/NEON/functions/NEPadLayer.cpp:283–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void NEPadLayer::run()
284{
285 ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "NEPadLayer::run");
286 if (_num_dimensions > 0)
287 {
288 switch (_mode)
289 {
290 case PaddingMode::CONSTANT:
291 {
292 NEScheduler::get().schedule(_pad_kernel.get(), Window::DimZ);
293 break;
294 }
295 case PaddingMode::REFLECT:
296 case PaddingMode::SYMMETRIC:
297 {
298 for (uint32_t i = 0; i < _num_dimensions; ++i)
299 {
300 if (_padding[i].first > 0 || _padding[i].second > 0)
301 {
302 if (_padding[i].first > 0 && _slice_results[2 * i].info()->total_size() > 0)
303 {
304 _slice_functions[2 * i].run();
305 }
306 if (_padding[i].second > 0 && _slice_results[2 * i + 1].info()->total_size() > 0)
307 {
308 _slice_functions[2 * i + 1].run();
309 }
310 _concat_functions[i].run();
311 }
312 }
313 break;
314 }
315 default:
316 ARM_COMPUTE_ERROR("Padding mode not supported.");
317 }
318 }
319 else
320 {
321 _copy_function.run();
322 }
323}
324} // namespace arm_compute

Callers

nothing calls this directly

Calls 4

scheduleMethod · 0.45
getMethod · 0.45
total_sizeMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected