Ocean
Loading...
Searching...
No Matches
TestFrameInterpolatorBilinearNEON.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTCV_TEST_FRAME_INTERPOLATOR_BILINEAR_NEON_H
9#define META_OCEAN_TEST_TESTCV_TEST_FRAME_INTERPOLATOR_BILINEAR_NEON_H
10
12
13namespace Ocean
14{
15
16namespace Test
17{
18
19namespace TestCV
20{
21
22/**
23 * This class implements tests for the NEON-accelerated bilinear interpolation functions.
24 * @ingroup testcv
25 */
26class OCEAN_TEST_CV_EXPORT TestFrameInterpolatorBilinearNEON
27{
28 public:
29
30 /**
31 * Invokes all NEON interpolation tests.
32 * @param testDuration Number of seconds for each test, with range (0, infinity)
33 * @return True, if succeeded
34 */
35 static bool test(const double testDuration);
36
37 /**
38 * Tests the correctness of interpolate4Pixels8BitPerChannelNEON<4u> against a scalar reference.
39 * @param testDuration Number of seconds for each test, with range (0, infinity)
40 * @return True, if succeeded
41 */
42 static bool testInterpolate4Pixels8BitPerChannel4NEON(const double testDuration);
43
44 /**
45 * Tests the correctness of interpolate4Pixels4Channel8BitPerChannelNEON against a scalar reference.
46 * @param testDuration Number of seconds for each test, with range (0, infinity)
47 * @return True, if succeeded
48 */
49 static bool testInterpolate4Pixels4Channel8BitPerChannelNEON(const double testDuration);
50
51 /**
52 * Benchmarks and compares the speed of the two 4-channel NEON interpolation functions.
53 * @param testDuration Number of seconds for the benchmark, with range (0, infinity)
54 * @return True, if succeeded
55 */
56 static bool testInterpolate4Pixels4ChannelNEONSpeedComparison(const double testDuration);
57
58 /**
59 * Tests that lookup8BitPerChannelSubsetNEON produces identical results with useOptimizedNEON=true and useOptimizedNEON=false for 4 channels.
60 * @param testDuration Number of seconds for each test, with range (0, infinity)
61 * @return True, if succeeded
62 */
63 static bool testLookup4ChannelOptimizedNEONConsistency(const double testDuration);
64
65 /**
66 * Tests all four combinations of useOptimizedNEON and useOptimizedBilinearValuesAndFactorCalculation, verifying output consistency and comparing performance.
67 * @param testDuration Number of seconds for each test, with range (0, infinity)
68 * @return True, if succeeded
69 */
70 static bool testLookup4ChannelOptimizedNEONAndBilinearFlags(const double testDuration);
71
72 /**
73 * Tests all six meaningful combinations of useOptimizedNEON, useOptimizedBilinearValuesAndFactorCalculation, and useOptimizedNEONFactorReplication, verifying output consistency and comparing performance.
74 * The two [useOptimizedNEON=false, useOptimizedNEONFactorReplication=true] combinations are omitted because useOptimizedNEONFactorReplication only takes effect when useOptimizedNEON=true.
75 * @param testDuration Number of seconds for each combination, with range (0, infinity)
76 * @return True, if succeeded
77 */
79};
80
81}
82
83}
84
85}
86
87#endif // META_OCEAN_TEST_TESTCV_TEST_FRAME_INTERPOLATOR_BILINEAR_NEON_H
This class implements tests for the NEON-accelerated bilinear interpolation functions.
Definition TestFrameInterpolatorBilinearNEON.h:27
static bool testInterpolate4Pixels4Channel8BitPerChannelNEON(const double testDuration)
Tests the correctness of interpolate4Pixels4Channel8BitPerChannelNEON against a scalar reference.
static bool testLookup4ChannelOptimizedNEONBilinearAndFactorReplicationFlags(const double testDuration)
Tests all six meaningful combinations of useOptimizedNEON, useOptimizedBilinearValuesAndFactorCalcula...
static bool test(const double testDuration)
Invokes all NEON interpolation tests.
static bool testInterpolate4Pixels4ChannelNEONSpeedComparison(const double testDuration)
Benchmarks and compares the speed of the two 4-channel NEON interpolation functions.
static bool testLookup4ChannelOptimizedNEONConsistency(const double testDuration)
Tests that lookup8BitPerChannelSubsetNEON produces identical results with useOptimizedNEON=true and u...
static bool testInterpolate4Pixels8BitPerChannel4NEON(const double testDuration)
Tests the correctness of interpolate4Pixels8BitPerChannelNEON<4u> against a scalar reference.
static bool testLookup4ChannelOptimizedNEONAndBilinearFlags(const double testDuration)
Tests all four combinations of useOptimizedNEON and useOptimizedBilinearValuesAndFactorCalculation,...
The namespace covering the entire Ocean framework.
Definition Accessor.h:15