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

Method run_op

src/gpu/cl/kernels/ClCastKernel.cpp:167–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void ClCastKernel::run_op(ITensorPack &tensors, const Window &window, ::cl::CommandQueue &queue)
168{
169 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
170 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window);
171
172 const auto src =
173 utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC));
174 auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
175
176 ARM_COMPUTE_ERROR_ON_NULLPTR(src, dst);
177
178 Window collapsed = window.collapse_if_possible(ICLKernel::window(), Window::DimZ);
179 Window slice = collapsed.first_slice_window_3D();
180
181 do
182 {
183 unsigned int idx = 0;
184 add_3D_tensor_argument(idx, src, slice);
185 add_3D_tensor_argument(idx, dst, slice);
186 enqueue(queue, *this, slice, lws_hint());
187 } while (collapsed.slide_window_slice_3D(slice));
188}
189} // namespace kernels
190} // namespace opencl
191} // namespace arm_compute

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected