Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: src/opts/SkNx_avx.h

Issue 1650653002: SkNx Load/store: take any pointer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify call sites Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkMatrix_opts.h ('k') | src/opts/SkNx_neon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkNx_avx.h
diff --git a/src/opts/SkNx_avx.h b/src/opts/SkNx_avx.h
index f635181a9265d38994760e84393155aaa1e12c2e..85a21105375eca7d7f24cbe64868f40746a3e87d 100644
--- a/src/opts/SkNx_avx.h
+++ b/src/opts/SkNx_avx.h
@@ -24,12 +24,12 @@ public:
SkNx() {}
SkNx(float val) : fVec(_mm256_set1_ps(val)) {}
- static SkNx Load(const float vals[8]) { return _mm256_loadu_ps(vals); }
+ static SkNx Load(const void* ptr) { return _mm256_loadu_ps((const float*)ptr); }
SkNx(float a, float b, float c, float d,
float e, float f, float g, float h) : fVec(_mm256_setr_ps(a,b,c,d,e,f,g,h)) {}
- void store(float vals[8]) const { _mm256_storeu_ps(vals, fVec); }
+ void store(void* ptr) const { _mm256_storeu_ps((float*)ptr, fVec); }
SkNx operator + (const SkNx& o) const { return _mm256_add_ps(fVec, o.fVec); }
SkNx operator - (const SkNx& o) const { return _mm256_sub_ps(fVec, o.fVec); }
« no previous file with comments | « src/opts/SkMatrix_opts.h ('k') | src/opts/SkNx_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698