aom: rename simd_cmp_impl.h to simd_cmp_impl.inc

From 9db8f4c5c011199a7a0c2c01484c0c86e8c7363e Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Fri, 14 Jun 2024 16:26:13 -0700
Subject: [PATCH] rename simd_cmp_impl.h to simd_cmp_impl.inc

Given how this function is used (no include guard with macro based
definitions / implementation), it's more correct for this to be a .inc
file:
https://google.github.io/styleguide/cppguide.html#Self_contained_Headers

+ move some functions into an anonymous namespace

This fixes some -Wmissing-prototypes warnings.

Bug: aomedia:3416
Change-Id: I0a5781338d63c62efc437d1676cb7a54aeed1238
---
 test/simd_cmp_avx2.cc                       | 2 +-
 test/{simd_cmp_impl.h => simd_cmp_impl.inc} | 4 ++--
 test/simd_cmp_sse2.cc                       | 2 +-
 test/simd_cmp_sse4.cc                       | 2 +-
 test/simd_cmp_ssse3.cc                      | 2 +-
 test/test.cmake                             | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
 rename test/{simd_cmp_impl.h => simd_cmp_impl.inc} (100%)

diff --git a/test/simd_cmp_avx2.cc b/test/simd_cmp_avx2.cc
index 53aa48c15..fd9836023 100644
--- a/test/simd_cmp_avx2.cc
+++ b/test/simd_cmp_avx2.cc
@@ -12,4 +12,4 @@
 #define ARCH AVX2
 #define ARCH_POSTFIX(name) name##_avx2
 #define SIMD_NAMESPACE simd_test_avx2
-#include "test/simd_cmp_impl.h"
+#include "test/simd_cmp_impl.inc"
diff --git a/test/simd_cmp_impl.h b/test/simd_cmp_impl.inc
similarity index 100%
rename from test/simd_cmp_impl.h
rename to test/simd_cmp_impl.inc
index 4bdf4975d..0a9a19516 100644
--- a/test/simd_cmp_impl.h
+++ b/test/simd_cmp_impl.inc
@@ -398,6 +398,8 @@ c_v256 c_imm_v256_align(c_v256 a, c_v256 b) {
   return c_v256_align(a, b, shift);
 }
 
+namespace {
+
 // Wrappers around the the SAD and SSD functions
 uint32_t v64_sad_u8(v64 a, v64 b) {
   return v64_sad_u8_sum(::v64_sad_u8(v64_sad_u8_init(), a, b));
@@ -461,8 +463,6 @@ uint64_t c_v256_ssd_s16(c_v256 a, c_v256 b) {
   return c_v256_ssd_s16_sum(::c_v256_ssd_s16(c_v256_ssd_s16_init(), a, b));
 }
 
-namespace {
-
 typedef void (*fptr)();
 
 typedef struct {
diff --git a/test/simd_cmp_sse2.cc b/test/simd_cmp_sse2.cc
index a5676d5e9..b73d712ab 100644
--- a/test/simd_cmp_sse2.cc
+++ b/test/simd_cmp_sse2.cc
@@ -14,5 +14,5 @@
 #define ARCH SSE2
 #define ARCH_POSTFIX(name) name##_sse2
 #define SIMD_NAMESPACE simd_test_sse2
-#include "test/simd_cmp_impl.h"
+#include "test/simd_cmp_impl.inc"
 #endif
diff --git a/test/simd_cmp_sse4.cc b/test/simd_cmp_sse4.cc
index f66aa1164..9b413f36d 100644
--- a/test/simd_cmp_sse4.cc
+++ b/test/simd_cmp_sse4.cc
@@ -14,5 +14,5 @@
 #define ARCH SSE4_1
 #define ARCH_POSTFIX(name) name##_sse4_1
 #define SIMD_NAMESPACE simd_test_sse4_1
-#include "test/simd_cmp_impl.h"
+#include "test/simd_cmp_impl.inc"
 #endif
diff --git a/test/simd_cmp_ssse3.cc b/test/simd_cmp_ssse3.cc
index 3775fdcc0..c5ee015b6 100644
--- a/test/simd_cmp_ssse3.cc
+++ b/test/simd_cmp_ssse3.cc
@@ -14,5 +14,5 @@
 #define ARCH SSSE3
 #define ARCH_POSTFIX(name) name##_ssse3
 #define SIMD_NAMESPACE simd_test_ssse3
-#include "test/simd_cmp_impl.h"
+#include "test/simd_cmp_impl.inc"
 #endif
diff --git a/test/test.cmake b/test/test.cmake
index 8090ad396..4a6d9b2ae 100644
--- a/test/test.cmake
+++ b/test/test.cmake
@@ -153,7 +153,7 @@ if(NOT BUILD_SHARED_LIBS)
               "${AOM_ROOT}/test/lpf_test.cc"
               "${AOM_ROOT}/test/scan_test.cc"
               "${AOM_ROOT}/test/selfguided_filter_test.cc"
-              "${AOM_ROOT}/test/simd_cmp_impl.h"
+              "${AOM_ROOT}/test/simd_cmp_impl.inc"
               "${AOM_ROOT}/test/simd_impl.h")
 
   if(HAVE_SSE2)