| 136 | } |
| 137 | |
| 138 | void ClPermuteKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) |
| 139 | { |
| 140 | ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); |
| 141 | ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(ICLKernel::window(), window); |
| 142 | |
| 143 | const auto src = |
| 144 | utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC)); |
| 145 | auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST)); |
| 146 | |
| 147 | Window slice_in = window.first_slice_window_4D().collapse(ICLKernel::window(), 2, 4); |
| 148 | |
| 149 | // Setup dst slice |
| 150 | Window slice_out(slice_in); |
| 151 | slice_out.set(Window::DimX, Window::Dimension(0, 0, 0)); |
| 152 | slice_out.set(Window::DimY, Window::Dimension(0, 0, 0)); |
| 153 | slice_out.set(Window::DimZ, Window::Dimension(0, 0, 0)); |
| 154 | slice_out.set(3, Window::Dimension(0, 0, 0)); |
| 155 | |
| 156 | do |
| 157 | { |
| 158 | unsigned int idx = 0; |
| 159 | add_4D_tensor_argument(idx, src, slice_in); |
| 160 | add_4D_tensor_argument(idx, dst, slice_out); |
| 161 | enqueue(queue, *this, slice_in, lws_hint()); |
| 162 | } while (window.slide_window_slice_4D(slice_in) && window.slide_window_slice_4D(slice_out)); |
| 163 | } |
| 164 | } // namespace kernels |
| 165 | } // namespace opencl |
| 166 | } // namespace arm_compute |
nothing calls this directly
no test coverage detected