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

Method run_op

src/gpu/cl/kernels/ClCropKernel.cpp:131–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void 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

Callers

nothing calls this directly

Calls 11

ceil_to_multipleFunction · 0.85
get_const_tensorMethod · 0.80
stepMethod · 0.80
WindowClass · 0.50
DimensionClass · 0.50
get_tensorMethod · 0.45
infoMethod · 0.45
setMethod · 0.45
startMethod · 0.45
xMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected