| 129 | } |
| 130 | |
| 131 | void ClCropKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) |
| 132 | { |
| 133 | ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); |
| 134 | ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window); |
| 135 | |
| 136 | const auto src = |
| 137 | utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC)); |
| 138 | auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST)); |
| 139 | |
| 140 | Window in_slice = Window(); |
| 141 | in_slice.use_tensor_dimensions(src->info()->tensor_shape()); |
| 142 | in_slice.set(Window::DimX, |
| 143 | Window::Dimension(in_slice.x().start(), ceil_to_multiple(in_slice.x().end(), window.x().step()), |
| 144 | window.x().step())); |
| 145 | in_slice.set(3, Window::Dimension(_batch_index, _batch_index + 1, 1)); |
| 146 | |
| 147 | unsigned int idx = 0; |
| 148 | add_3D_tensor_argument(idx, src, in_slice); |
| 149 | add_3D_tensor_argument(idx, dst, window); |
| 150 | add_argument(idx, _start.x); |
| 151 | add_argument(idx, _start.y); |
| 152 | enqueue(queue, *this, window, lws_hint()); |
| 153 | } |
| 154 | } // namespace kernels |
| 155 | } // namespace opencl |
| 156 | } // namespace arm_compute |
nothing calls this directly
no test coverage detected