Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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_H_ | |
| 6 #define MEDIA_BASE_VECTOR_MATH_H_ | |
| 7 | |
| 8 #include "base/gtest_prod_util.h" | |
| 9 #include "media/base/media_export.h" | |
| 10 | |
| 11 namespace media { | |
| 12 | |
| 13 class MEDIA_EXPORT VectorMath { | |
| 14 public: | |
| 15 // Required alignment for inputs and outputs to all VectorMath functions | |
| 16 enum { kRequiredAlignment = 16 }; | |
| 17 | |
| 18 // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. | |
| 19 // |src| and |dest| must be aligned by kRequiredAlignment. | |
| 20 static void FMAC(const float src[], float scale, int len, float dest[]); | |
| 21 | |
| 22 private: | |
| 23 FRIEND_TEST_ALL_PREFIXES(VectorMathTest, FMAC); | |
| 24 FRIEND_TEST_ALL_PREFIXES(VectorMathTest, FMACBenchmark); | |
| 25 | |
| 26 static void FMAC_C(const float src[], float scale, int len, float dest[]); | |
| 27 static void FMAC_SSE(const float src[], float scale, int len, float dest[]); | |
|
Ami GONE FROM CHROMIUM
2012/08/23 17:28:12
As long as this class is a container of stateless
DaleCurtis
2012/08/23 19:59:54
Good idea. Using a namespace allows me to get rid
| |
| 28 }; | |
| 29 | |
| 30 } // namespace media | |
| 31 | |
| 32 #endif // MEDIA_BASE_VECTOR_MATH_H_ | |
| OLD | NEW |