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

Method run_op

src/gpu/cl/kernels/ClPermuteKernel.cpp:138–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void 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

Callers

nothing calls this directly

Calls 7

get_const_tensorMethod · 0.80
first_slice_window_4DMethod · 0.80
slide_window_slice_4DMethod · 0.80
DimensionClass · 0.50
get_tensorMethod · 0.45
collapseMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected