From a5ba0d35d5c10cf1368c7b2eeca9ac2dea989b89 Mon Sep 17 00:00:00 2001 From: Denes Tarjan Date: Wed, 17 Jul 2024 12:57:09 +0000 Subject: [PATCH 1/3] Rename to test_thread_yuv_sp_to_rgb.cpp --- .../{test_thread_yuv_to_rgb.cpp => test_thread_yuv_sp_to_rgb.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/api/{test_thread_yuv_to_rgb.cpp => test_thread_yuv_sp_to_rgb.cpp} (100%) diff --git a/test/api/test_thread_yuv_to_rgb.cpp b/test/api/test_thread_yuv_sp_to_rgb.cpp similarity index 100% rename from test/api/test_thread_yuv_to_rgb.cpp rename to test/api/test_thread_yuv_sp_to_rgb.cpp -- GitLab From 9d8798f0a996eddc99d92d04112741cb9954b56f Mon Sep 17 00:00:00 2001 From: Denes Tarjan Date: Wed, 17 Jul 2024 13:01:43 +0000 Subject: [PATCH 2/3] Rename test to YuvSp.Thread --- test/api/test_thread_yuv_sp_to_rgb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/api/test_thread_yuv_sp_to_rgb.cpp b/test/api/test_thread_yuv_sp_to_rgb.cpp index b8fb8bccb..ec560fc3a 100644 --- a/test/api/test_thread_yuv_sp_to_rgb.cpp +++ b/test/api/test_thread_yuv_sp_to_rgb.cpp @@ -16,9 +16,9 @@ // Tuple of width, height, thread count. typedef std::tuple P; -class YUVtoRGB : public testing::TestWithParam

{}; +class Thread : public testing::TestWithParam

{}; -TEST_P(YUVtoRGB, YUVtoRGB) { +TEST_P(Thread, T) { unsigned width = 0, height = 0, thread_count = 0; std::tie(width, height, thread_count) = GetParam(); test::Array2D src_y(width, height), @@ -44,7 +44,7 @@ TEST_P(YUVtoRGB, YUVtoRGB) { EXPECT_EQ_ARRAY2D(dst_multi, dst_single); } -INSTANTIATE_TEST_SUITE_P(YUVtoRGB, YUVtoRGB, +INSTANTIATE_TEST_SUITE_P(YuvSp, Thread, testing::Values(P{1, 1, 1}, P{1, 2, 1}, P{1, 2, 2}, P{2, 1, 2}, P{2, 2, 1}, P{1, 3, 2}, P{2, 3, 1}, P{6, 4, 1}, P{4, 5, 2}, -- GitLab From 69c1a8d4b91d5d88f48bece8510753f831996c83 Mon Sep 17 00:00:00 2001 From: Denes Tarjan Date: Wed, 17 Jul 2024 14:55:23 +0000 Subject: [PATCH 3/3] Use CamelCase in test names --- .devcontainer/coverage.sh | 4 +-- scripts/ci.sh | 2 +- test/api/test_rgb_to_yuv.cpp | 36 +++++++++++++------------- test/api/test_thread_yuv_sp_to_rgb.cpp | 2 +- test/api/test_yuv_sp_to_rgb.cpp | 32 +++++++++++------------ test/api/test_yuv_to_rgb.cpp | 20 +++++++------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.devcontainer/coverage.sh b/.devcontainer/coverage.sh index def7d4ab3..99addc712 100755 --- a/.devcontainer/coverage.sh +++ b/.devcontainer/coverage.sh @@ -15,11 +15,11 @@ EXTRA_CMAKE_ARGS="-DKLEIDICV_LIMIT_SME2_TO_SELECTED_ALGORITHMS=OFF -DKLEIDICV_LI # Clean any coverage results from previous runs find build/kleidicv-coverage/ -type f -name *.gcda -delete -LONG_VECTOR_TESTS="GRAY2.*:RGB*" +LONG_VECTOR_TESTS="GRAY2.*:RGB*:Yuv*:Rgb*" qemu-aarch64 build/kleidicv-coverage/test/framework/kleidicv-framework-test qemu-aarch64 -cpu cortex-a35 build/kleidicv-coverage/test/api/kleidicv-api-test -qemu-aarch64 -cpu max,sve128=on,sme=off build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=16 +qemu-aarch64 -cpu max,sve128=on,sme=off build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=16 qemu-aarch64 -cpu max,sve2048=on,sve-default-vector-length=256,sme=off \ build/kleidicv-coverage/test/api/kleidicv-api-test --gtest_filter="${LONG_VECTOR_TESTS}" --vector-length=256 qemu-aarch64 -cpu max,sve128=on,sme512=on build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=64 diff --git a/scripts/ci.sh b/scripts/ci.sh index b80bc5f6e..5fb369bb4 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -53,7 +53,7 @@ CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ cmake -S . -B build/gcc -G Ni ninja -C build/gcc # Run tests -LONG_VECTOR_TESTS="GRAY2.*:RGB*" +LONG_VECTOR_TESTS="GRAY2.*:RGB*:Yuv*:Rgb*" TESTRESULT=0 qemu-aarch64 build/test/framework/kleidicv-framework-test --gtest_output=xml:build/test-results/ || TESTRESULT=1 qemu-aarch64 -cpu cortex-a35 build/test/api/kleidicv-api-test --gtest_output=xml:build/test-results/clang-neon/ || TESTRESULT=1 diff --git a/test/api/test_rgb_to_yuv.cpp b/test/api/test_rgb_to_yuv.cpp index d770a9bd8..a76fa5aa5 100644 --- a/test/api/test_rgb_to_yuv.cpp +++ b/test/api/test_rgb_to_yuv.cpp @@ -10,9 +10,9 @@ #include "kleidicv/utils.h" #include "test_config.h" -class RGB2YUVTest final { +class RgbToYuvTest final { public: - RGB2YUVTest(size_t channels, bool switch_blue) + RgbToYuvTest(size_t channels, bool switch_blue) : src_channels_(channels), switch_blue_(switch_blue) {} template @@ -111,42 +111,42 @@ class RGB2YUVTest final { bool switch_blue_; }; -TEST(RGBToYUV, RGB_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(3, false); +TEST(RgbToYuv, RgbYuvScalar) { + RgbToYuvTest rgb2yuv_test(3, false); rgb2yuv_test.execute_scalar_test(kleidicv_rgb_to_yuv_u8); } -TEST(RGBToYUV, RGB_YUV_vector) { - RGB2YUVTest rgb2yuv_test(3, false); +TEST(RgbToYuv, RgbYuvVector) { + RgbToYuvTest rgb2yuv_test(3, false); rgb2yuv_test.execute_vector_test(kleidicv_rgb_to_yuv_u8); } -TEST(RGBToYUV, RGBA_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(4, false); +TEST(RgbToYuv, RgbaYuvScalar) { + RgbToYuvTest rgb2yuv_test(4, false); rgb2yuv_test.execute_scalar_test(kleidicv_rgba_to_yuv_u8); } -TEST(RGBToYUV, RGBA_YUV_vector) { - RGB2YUVTest rgb2yuv_test(4, false); +TEST(RgbToYuv, RgbaYuvVector) { + RgbToYuvTest rgb2yuv_test(4, false); rgb2yuv_test.execute_vector_test(kleidicv_rgba_to_yuv_u8); } -TEST(RGBToYUV, BGR_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(3, true); +TEST(RgbToYuv, BgrYuvScalar) { + RgbToYuvTest rgb2yuv_test(3, true); rgb2yuv_test.execute_scalar_test(kleidicv_bgr_to_yuv_u8); } -TEST(RGBToYUV, BGR_YUV_vector) { - RGB2YUVTest rgb2yuv_test(3, true); +TEST(RgbToYuv, BgrYuvVector) { + RgbToYuvTest rgb2yuv_test(3, true); rgb2yuv_test.execute_vector_test(kleidicv_bgr_to_yuv_u8); } -TEST(RGBToYUV, BGRA_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(4, true); +TEST(RgbToYuv, BgraYuvScalar) { + RgbToYuvTest rgb2yuv_test(4, true); rgb2yuv_test.execute_scalar_test(kleidicv_bgra_to_yuv_u8); } -TEST(RGBToYUV, BGRA_YUV_vector) { - RGB2YUVTest rgb2yuv_test(4, true); +TEST(RgbToYuv, BgraYuvVector) { + RgbToYuvTest rgb2yuv_test(4, true); rgb2yuv_test.execute_vector_test(kleidicv_bgra_to_yuv_u8); } diff --git a/test/api/test_thread_yuv_sp_to_rgb.cpp b/test/api/test_thread_yuv_sp_to_rgb.cpp index ec560fc3a..1f3731df2 100644 --- a/test/api/test_thread_yuv_sp_to_rgb.cpp +++ b/test/api/test_thread_yuv_sp_to_rgb.cpp @@ -18,7 +18,7 @@ typedef std::tuple P; class Thread : public testing::TestWithParam

{}; -TEST_P(Thread, T) { +TEST_P(Thread, _) { unsigned width = 0, height = 0, thread_count = 0; std::tie(width, height, thread_count) = GetParam(); test::Array2D src_y(width, height), diff --git a/test/api/test_yuv_sp_to_rgb.cpp b/test/api/test_yuv_sp_to_rgb.cpp index 729a0db6e..e79c01cda 100644 --- a/test/api/test_yuv_sp_to_rgb.cpp +++ b/test/api/test_yuv_sp_to_rgb.cpp @@ -141,82 +141,82 @@ class YuvSpTest final { bool switch_blue_; }; -TEST(YUVSP, RGB_NV12_scalar) { +TEST(YuvSp, RgbNv12Scalar) { YuvSpTest yuv_test(3, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgb_u8, false); } -TEST(YUVSP, RGB_NV12_vector) { +TEST(YuvSp, RgbNv12Vector) { YuvSpTest yuv_test(3, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgb_u8, false); } -TEST(YUVSP, RGB_NV21_scalar) { +TEST(YuvSp, RgbNv21Scalar) { YuvSpTest yuv_test(3, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgb_u8, true); } -TEST(YUVSP, RGB_NV21_vector) { +TEST(YuvSp, RgbNv21Vector) { YuvSpTest yuv_test(3, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgb_u8, true); } -TEST(YUVSP, BGR_NV12_scalar) { +TEST(YuvSp, BgrNv12Scalar) { YuvSpTest yuv_test(3, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgr_u8, false); } -TEST(YUVSP, BGR_NV12_vector) { +TEST(YuvSp, BgrNv12Vector) { YuvSpTest yuv_test(3, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgr_u8, false); } -TEST(YUVSP, BGR_NV21_scalar) { +TEST(YuvSp, BgrNv21Scalar) { YuvSpTest yuv_test(3, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgr_u8, true); } -TEST(YUVSP, BGR_NV21_vector) { +TEST(YuvSp, BgrNv21Vector) { YuvSpTest yuv_test(3, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgr_u8, true); } -TEST(YUVSP, RGBA_NV12_scalar) { +TEST(YuvSp, RgbaNv12Scalar) { YuvSpTest yuv_test(4, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgba_u8, false); } -TEST(YUVSP, RGBA_NV12_vector) { +TEST(YuvSp, RgbaNv12Vector) { YuvSpTest yuv_test(4, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgba_u8, false); } -TEST(YUVSP, RGBA_NV21_scalar) { +TEST(YuvSp, RgbaNv21Scalar) { YuvSpTest yuv_test(4, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgba_u8, true); } -TEST(YUVSP, RGBA_NV21_vector) { +TEST(YuvSp, RgbaNv21Vector) { YuvSpTest yuv_test(4, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgba_u8, true); } -TEST(YUVSP, BGRA_NV12_scalar) { +TEST(YuvSp, BgraNv12Scalar) { YuvSpTest yuv_test(4, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgra_u8, false); } -TEST(YUVSP, BGRA_NV12_vector) { +TEST(YuvSp, BgraNv12Vector) { YuvSpTest yuv_test(4, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgra_u8, false); } -TEST(YUVSP, BGRA_NV21_scalar) { +TEST(YuvSp, BgraNv21Scalar) { YuvSpTest yuv_test(4, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgra_u8, true); } -TEST(YUVSP, BGRA_NV21_vector) { +TEST(YuvSp, BgraNv21Vector) { YuvSpTest yuv_test(4, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgra_u8, true); } diff --git a/test/api/test_yuv_to_rgb.cpp b/test/api/test_yuv_to_rgb.cpp index 4aaf5f248..e37662872 100644 --- a/test/api/test_yuv_to_rgb.cpp +++ b/test/api/test_yuv_to_rgb.cpp @@ -10,9 +10,9 @@ #include "kleidicv/utils.h" #include "test_config.h" -class YUV2RGBTest final { +class YuvToRgbTest final { public: - explicit YUV2RGBTest(bool switch_blue) : switch_blue_(switch_blue) {} + explicit YuvToRgbTest(bool switch_blue) : switch_blue_(switch_blue) {} template void execute_scalar_test(F impl) { @@ -106,22 +106,22 @@ class YUV2RGBTest final { } }; -TEST(YUV2RGB, YUV_RGB_scalar) { - YUV2RGBTest yuv2rgb_test(false); +TEST(YuvToRgb, YuvRgbScalar) { + YuvToRgbTest yuv2rgb_test(false); yuv2rgb_test.execute_scalar_test(kleidicv_yuv_to_rgb_u8); } -TEST(YUV2RGB, YUV_RGB_vector) { - YUV2RGBTest yuv2rgb_test(false); +TEST(YuvToRgb, YuvRgbVector) { + YuvToRgbTest yuv2rgb_test(false); yuv2rgb_test.execute_vector_test(kleidicv_yuv_to_rgb_u8); } -TEST(YUV2RGB, YUV_BGR_scalar) { - YUV2RGBTest yuv2rgb_test(true); +TEST(YuvToRgb, YuvBgrScalar) { + YuvToRgbTest yuv2rgb_test(true); yuv2rgb_test.execute_scalar_test(kleidicv_yuv_to_bgr_u8); } -TEST(YUV2RGB, YUV_BGR_vector) { - YUV2RGBTest yuv2rgb_test(true); +TEST(YuvToRgb, YuvBgrVector) { + YuvToRgbTest yuv2rgb_test(true); yuv2rgb_test.execute_vector_test(kleidicv_yuv_to_bgr_u8); } -- GitLab