41 const int32_t idx = *num_corner_candidates;
43 *num_corner_candidates += 1;
48 output[idx] = std::make_tuple(x, y, strength);
52 inline void corner_candidates(
const float *__restrict
input,
InternalKeypoint *__restrict output, int32_t x, int32_t y, int32_t *num_corner_candidates,
arm_compute::Mutex *corner_candidates_mutex)
54 check_corner(x, y, *input, output, num_corner_candidates, corner_candidates_mutex);
60 return std::get<2>(lhs) > std::get<2>(rhs);
64 : _num_corner_candidates(nullptr), _corner_candidates_mutex(), _input(nullptr), _output(nullptr)
78 _num_corner_candidates = num_corner_candidates;
87 ICPPKernel::configure(win);
99 corner_candidates(reinterpret_cast<float *>(input.
ptr()), &_output[0],
id.x(),
id.
y(), _num_corner_candidates, &_corner_candidates_mutex);
bool keypoint_compare(const InternalKeypoint &lhs, const InternalKeypoint &rhs)
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
const Window & window() const
The maximum window the kernel can be executed on.
CPPCornerCandidatesKernel()
Default constructor.
#define ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(t)
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
std::mutex Mutex
Wrapper of Mutex data-object.
std::unique_lock< Mutex > unique_lock
Wrapper of lock_guard data-object.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Class to describe a number of elements in each dimension.
Implementation of a row access pattern.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
constexpr uint8_t * ptr() const
Return a pointer to the current pixel.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Information about executing thread and CPU.
unsigned int num_elems_processed_per_iteration
void execute_window_loop(const Window &w, L &&lambda_function, Ts &&... iterators)
Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...
Iterator updated by execute_window_loop for each window element.
Describe a multidimensional execution window.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
void configure(const IImage *input, InternalKeypoint *output, int32_t *num_corner_candidates)
Setup the kernel parameters.