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

Unified Diff: src/core/Sk4x_sse.h

Issue 960773005: Think implicit promotion is a good idea? (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/core/Sk4x_portable.h ('k') | tests/Sk4xTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/Sk4x_sse.h
diff --git a/src/core/Sk4x_sse.h b/src/core/Sk4x_sse.h
index 10a0a830dfe27bb0460fd1057f2ce97f03c19e27..ee09f774493946c29d55a019658df484ee7d6ccd 100644
--- a/src/core/Sk4x_sse.h
+++ b/src/core/Sk4x_sse.h
@@ -75,6 +75,7 @@ Sk4x<T> Sk4x<T>::ZWCD(const Sk4x<T>& a, const Sk4x<T>& b) {
// Now we'll write all Sk4f specific methods. This M() macro will remove some noise.
#define M(...) template <> inline __VA_ARGS__ Sk4f::
+M() Sk4x(float v) : fVec(_mm_set1_ps(v)) {}
M() Sk4x(float a, float b, float c, float d) : fVec(_mm_set_ps(d,c,b,a)) {}
M(Sk4f) Load (const float fs[4]) { return _mm_loadu_ps(fs); }
@@ -112,6 +113,7 @@ M(Sk4f) Max(const Sk4f& a, const Sk4f& b) { return _mm_max_ps(a.fVec, b.fVec); }
#undef M
#define M(...) template <> inline __VA_ARGS__ Sk4i::
+M() Sk4x(int32_t v) : fVec(_mm_set1_epi32(v)) {}
M() Sk4x(int32_t a, int32_t b, int32_t c, int32_t d) : fVec(_mm_set_epi32(d,c,b,a)) {}
M(Sk4i) Load (const int32_t is[4]) { return _mm_loadu_si128((const __m128i*)is); }
« no previous file with comments | « src/core/Sk4x_portable.h ('k') | tests/Sk4xTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698