diff options
author | John Richardson <john.richardson@arm.com> | 2018-02-22 14:09:31 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 8de92619e223225aabdca873c02f231d8e941fd1 (patch) | |
tree | 6b0c7a04e58e120fc9969270cb7ba432a31e1258 /src/core/CL/kernels | |
parent | 2abb216e1aaeefe65c8a7e6294b4735f0647c927 (diff) | |
download | ComputeLibrary-8de92619e223225aabdca873c02f231d8e941fd1.tar.gz |
COMPMID-585: Port OpticalFlow to new validation
Change-Id: Ia36bd11ca27420d3059eea15df81b237900149ec
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125175
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: John Richardson <john.richardson@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLLKTrackerKernel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/CL/kernels/CLLKTrackerKernel.cpp b/src/core/CL/kernels/CLLKTrackerKernel.cpp index 12cdd0ec93..078d18e61c 100644 --- a/src/core/CL/kernels/CLLKTrackerKernel.cpp +++ b/src/core/CL/kernels/CLLKTrackerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -249,8 +249,12 @@ void CLLKTrackerStage1Kernel::configure(const ICLTensor *new_input, ICLLKInterna static_cast<cl_float>(valid_region.start(0)) } }; - const int term_iteration = (termination == Termination::TERM_CRITERIA_ITERATIONS || termination == Termination::TERM_CRITERIA_BOTH) ? 1 : 0; - const int term_epsilon = (termination == Termination::TERM_CRITERIA_EPSILON || termination == Termination::TERM_CRITERIA_BOTH) ? 1 : 0; + + // Set maximum number of iterations used for convergence + const size_t max_iterations = 1000; + num_iterations = (termination == Termination::TERM_CRITERIA_EPSILON) ? max_iterations : num_iterations; + + const int term_epsilon = (termination == Termination::TERM_CRITERIA_EPSILON || termination == Termination::TERM_CRITERIA_BOTH) ? 1 : 0; // Create kernel _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("lktracker_stage1")); @@ -268,7 +272,6 @@ void CLLKTrackerStage1Kernel::configure(const ICLTensor *new_input, ICLLKInterna _kernel.setArg<cl_float3>(idx++, border_limits); _kernel.setArg<cl_float>(idx++, eig_const); _kernel.setArg<cl_int>(idx++, level0); - _kernel.setArg<cl_int>(idx++, term_iteration); _kernel.setArg<cl_int>(idx++, term_epsilon); } |