1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef MEDIA_BASE_VECTOR_MATH_TESTING_H_ 6#define MEDIA_BASE_VECTOR_MATH_TESTING_H_ 7 8#include <utility> 9 10#include "build/build_config.h" 11#include "media/base/media_export.h" 12 13namespace media { 14namespace vector_math { 15 16// Optimized versions exposed for testing. See vector_math.h for details. 17MEDIA_EXPORT void FMAC_C(const float src[], float scale, int len, float dest[]); 18MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]); 19MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_C( 20 float initial_value, const float src[], int len, float smoothing_factor); 21 22#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) 23MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, 24 float dest[]); 25MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, 26 float dest[]); 27MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_SSE( 28 float initial_value, const float src[], int len, float smoothing_factor); 29#endif 30 31#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) 32MEDIA_EXPORT void FMAC_NEON(const float src[], float scale, int len, 33 float dest[]); 34MEDIA_EXPORT void FMUL_NEON(const float src[], float scale, int len, 35 float dest[]); 36MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_NEON( 37 float initial_value, const float src[], int len, float smoothing_factor); 38#endif 39 40} // namespace vector_math 41} // namespace media 42 43#endif // MEDIA_BASE_VECTOR_MATH_TESTING_H_ 44