move sk_memset?? to SkOpts
This lets the compiler generate AVX versions with wider writes.
Change-Id: Ia63825e70c72bdb4d14bef97d8b4ea4be54c9d84
Reviewed-on: https://skia-review.googlesource.com/17715
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/src/opts/SkOpts_avx.cpp b/src/opts/SkOpts_avx.cpp
index 06e46d9..7e34330 100644
--- a/src/opts/SkOpts_avx.cpp
+++ b/src/opts/SkOpts_avx.cpp
@@ -8,12 +8,17 @@
#include "SkSafe_math.h" // Keep this first.
#include "SkOpts.h"
-#define SK_OPTS_NS avx
-
#if defined(_INC_MATH) && !defined(INC_MATH_IS_SAFE_NOW)
#error We have included ucrt\math.h without protecting it against ODR violation.
#endif
+#define SK_OPTS_NS avx
+#include "SkUtils_opts.h"
+
namespace SkOpts {
- void Init_avx() { }
+ void Init_avx() {
+ memset16 = SK_OPTS_NS::memset16;
+ memset32 = SK_OPTS_NS::memset32;
+ memset64 = SK_OPTS_NS::memset64;
+ }
}