bool StretchGray2x2AutoTest() { bool result = true; result = result && StretchGrayAutoTest(FUNC(Simd::Base::StretchGray2x2), FUNC(SimdStretchGray2x2), 2); #ifdef SIMD_SSE2_ENABLE if(Simd::Sse2::Enable) result = result && StretchGrayAutoTest(FUNC(Simd::Sse2::StretchGray2x2), FUNC(SimdStretchGray2x2), 2); #endif #ifdef SIMD_AVX2_ENABLE if(Simd::Avx2::Enable) result = result && StretchGrayAutoTest(FUNC(Simd::Avx2::StretchGray2x2), FUNC(SimdStretchGray2x2), 2); #endif #ifdef SIMD_VMX_ENABLE if(Simd::Vmx::Enable) result = result && StretchGrayAutoTest(FUNC(Simd::Vmx::StretchGray2x2), FUNC(SimdStretchGray2x2), 2); #endif #ifdef SIMD_NEON_ENABLE if (Simd::Neon::Enable) result = result && StretchGrayAutoTest(FUNC(Simd::Neon::StretchGray2x2), FUNC(SimdStretchGray2x2), 2); #endif return result; }
bool StretchGrayAutoTest(const Func & f1, const Func & f2, int stretch) { bool result = true; result = result && StretchGrayAutoTest(W, H, f1, f2, stretch); result = result && StretchGrayAutoTest(W + O, H - O, f1, f2, stretch); result = result && StretchGrayAutoTest(W - O, H + O, f1, f2, stretch); return result; }