| 323 | } |
| 324 | |
| 325 | void 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 |
nothing calls this directly
no test coverage detected