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

Method run_op

src/gpu/cl/kernels/ClCopyKernel.cpp:152–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void ClCopyKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue)
153{
154 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
155 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window);
156
157 const auto src =
158 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC));
159 auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
160
161 Window slice;
162
163 if (_has_dst_window)
164 {
165 slice = window.first_slice_window_3D();
166 Window out_slice = _dst_window.first_slice_window_3D();
167 do
168 {
169 unsigned int idx = 0;
170 add_3D_tensor_argument(idx, src, slice);
171 add_3D_tensor_argument(idx, dst, out_slice);
172 enqueue(queue, *this, slice, lws_hint());
173 } while (window.slide_window_slice_3D(slice) && _dst_window.slide_window_slice_3D(out_slice));
174 }
175 else
176 {
177 Window collapsed = window.collapse_if_possible(ICLKernel::window(), Window::DimZ);
178 slice = collapsed.first_slice_window_3D();
179 do
180 {
181 unsigned int idx = 0;
182 add_3D_tensor_argument(idx, src, slice);
183 add_3D_tensor_argument(idx, dst, slice);
184 enqueue(queue, *this, slice, lws_hint());
185 } while (collapsed.slide_window_slice_3D(slice));
186 }
187}
188} // namespace kernels
189} // namespace opencl
190} // namespace arm_compute

Callers

nothing calls this directly

Calls 5

get_const_tensorMethod · 0.80
first_slice_window_3DMethod · 0.80
slide_window_slice_3DMethod · 0.80
collapse_if_possibleMethod · 0.80
get_tensorMethod · 0.45

Tested by

no test coverage detected