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

Method run

src/core/NEON/kernels/NECropKernel.cpp:325–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void NECropKernel::run(const Window &window, const ThreadInfo &info)
326{
327 ARM_COMPUTE_UNUSED(window, info);
328 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
329 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window);
330
331 ARM_COMPUTE_ERROR_ON(_input->info()->has_padding());
332 ARM_COMPUTE_ERROR_ON(_output->info()->has_padding());
333
334 const auto *uk = get_implementation(CropSelectorData{_input->info()->data_type()});
335
336 uint32_t batch_index =
337 std::min(static_cast<uint32_t>(_input->info()->tensor_shape()[3]),
338 *(reinterpret_cast<uint32_t *>(_box_ind->ptr_to_element(Coordinates(_crop_box_ind)))));
339
340 ARM_COMPUTE_ERROR_ON(batch_index >= _input->info()->tensor_shape()[3]);
341
342 Coordinates input_offset(
343 0, _end[0] < _start[0] ? _start[0] - _cols_out_of_bounds[0] : _start[0] + _cols_out_of_bounds[0],
344 _end[1] < _start[1] ? _start[1] - _rows_out_of_bounds[0] : _start[1] + _rows_out_of_bounds[0], batch_index);
345 execute_window(_input, _output, input_offset, _extrapolation_value, _rows_out_of_bounds, _cols_out_of_bounds,
346 uk->ukernel,
347 _end[1]<_start[1],
348 _cols_out_of_bounds[0] +
349 _cols_out_of_bounds[1]<_output->info()->dimension(1), _cols_out_of_bounds[0]> 0,
350 _cols_out_of_bounds[1]> 0,
351 _start[0] <= _end[0], _end[0] < _start[0]);
352}
353} // namespace arm_compute

Callers

nothing calls this directly

Calls 8

execute_windowFunction · 0.85
ptr_to_elementMethod · 0.80
get_implementationFunction · 0.70
CoordinatesClass · 0.70
has_paddingMethod · 0.45
infoMethod · 0.45
data_typeMethod · 0.45
dimensionMethod · 0.45

Tested by

no test coverage detected