bool AddFeatureDifferenceAutoTest(const Func & f1, const Func & f2) { bool result = true; const uint16_t delta = 256*7; for(uint16_t weight = 0; weight < 4 && result; ++weight) { result = result && AddFeatureDifferenceAutoTest(W, H, weight*delta, f1, f2); result = result && AddFeatureDifferenceAutoTest(W + O, H - O, weight*delta, f1, f2); result = result && AddFeatureDifferenceAutoTest(W - O, H + O, weight*delta, f1, f2); } return result; }
bool AddFeatureDifferenceAutoTest() { bool result = true; result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Base::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #ifdef SIMD_SSE2_ENABLE if(Simd::Sse2::Enable) result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Sse2::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #endif #ifdef SIMD_AVX2_ENABLE if(Simd::Avx2::Enable) result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Avx2::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #endif #ifdef SIMD_VMX_ENABLE if(Simd::Vmx::Enable) result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Vmx::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #endif #ifdef SIMD_NEON_ENABLE if (Simd::Neon::Enable) result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Neon::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #endif #ifdef SIMD_MSA_ENABLE if (Simd::Msa::Enable) result = result && AddFeatureDifferenceAutoTest(FUNC(Simd::Msa::AddFeatureDifference), FUNC(SimdAddFeatureDifference)); #endif return result; }