#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <memory>
#include "base/cpu.h"
#include "base/memory/aligned_memory.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/vector_math.h"
#include "media/base/vector_math_testing.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
TimeTicks;
fill;
namespace {
perf_test::PerfResultReporter SetUpReporter(const std::string& story_name) { … }
}
namespace media {
static const int kBenchmarkIterations = …;
static const int kEWMABenchmarkIterations = …;
static const float kScale = …;
static const int kVectorSize = …;
class VectorMathPerfTest : public testing::Test { … };
TEST_F(VectorMathPerfTest, FMAC_unoptimized) { … }
TEST_F(VectorMathPerfTest, FMAC_optimized_unaligned) { … }
TEST_F(VectorMathPerfTest, FMAC_optimized_aligned) { … }
TEST_F(VectorMathPerfTest, FMUL_unoptimized) { … }
TEST_F(VectorMathPerfTest, FMUL_optimized_unaligned) { … }
TEST_F(VectorMathPerfTest, FMUL_optimized_aligned) { … }
TEST_F(VectorMathPerfTest, EWMAAndMaxPower_unoptimized) { … }
TEST_F(VectorMathPerfTest, EWMAAndMaxPower_optimized_unaligned) { … }
TEST_F(VectorMathPerfTest, EWMAAndMaxPower_optimized_aligned) { … }
}