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

Method run

src/runtime/NEON/functions/NECropResize.cpp:132–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void NECropResize::run()
133{
134 ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "NECropResize::run");
135 ARM_COMPUTE_ERROR_ON_MSG(_output == nullptr, "Unconfigured function");
136
137 for (unsigned int i = 0; i < _num_boxes; ++i)
138 {
139 // Size of the crop box in _boxes and thus the shape of _crop_results[i]
140 // may not be known until run-time and so the kernels cannot be configured until then.
141 _crop[i]->configure_output_shape();
142 _crop_results[i]->allocator()->allocate();
143 NEScheduler::get().schedule(_crop[i].get(), Window::DimZ);
144
145 // Scale the cropped image.
146 _scale[i]->configure(_crop_results[i].get(), _scaled_results[i].get(),
147 ScaleKernelInfo{_method, BorderMode::CONSTANT, PixelValue(_extrapolation_value),
148 SamplingPolicy::TOP_LEFT, false});
149 _scaled_results[i]->allocator()->allocate();
150 _scale[i]->run();
151
152 // Copy scaled image into output.
153 std::copy_n(_scaled_results[i]->buffer(), _scaled_results[i]->info()->total_size(),
154 _output->ptr_to_element(Coordinates(0, 0, 0, i)));
155 }
156}
157} // namespace arm_compute

Callers

nothing calls this directly

Calls 12

PixelValueClass · 0.85
ptr_to_elementMethod · 0.80
CoordinatesClass · 0.50
allocateMethod · 0.45
allocatorMethod · 0.45
scheduleMethod · 0.45
getMethod · 0.45
configureMethod · 0.45
bufferMethod · 0.45
total_sizeMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected