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

Issue 1048593002: Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T> (Closed)

Created:
5 years, 8 months ago by mtklein_C
Modified:
5 years, 8 months ago
Reviewers:
mtklein, reed2
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T> The primary feature this delivers is SkNf and SkNd for arbitrary power-of-two N. Non-specialized types or types larger than 128 bits should now Just Work (and we can drop in a specialization to make them faster). Sk4s is now just a typedef for SkNf<4, SkScalar>; Sk4d is SkNf<4, double>, Sk2f SkNf<2, float>, etc. This also makes implementing new specializations easier and more encapsulated. We're now using template specialization, which means the specialized versions don't have to leak out so much from SkNx_sse.h and SkNx_neon.h. This design leaves us room to grow up, e.g to SkNf<8, SkScalar> == Sk8s, and to grown down too, to things like SkNi<8, uint16_t> == Sk8h. To simplify things, I've stripped away most APIs (swizzles, casts, reinterpret_casts) that no one's using yet. I will happily add them back if they seem useful. You shouldn't feel bad about using any of the typedef Sk4s, Sk4f, Sk4d, Sk2s, Sk2f, Sk2d, Sk4i, etc. Here's how you should feel: - Sk4f, Sk4s, Sk2d: feel awesome - Sk2f, Sk2s, Sk4d: feel pretty good No public API changes. TBR=reed@google.com BUG=skia:3592 Committed: https://skia.googlesource.com/skia/+/c9adb05b64fa0bfadf9d1a782afcda470da68c9e

Patch Set 1 #

Patch Set 2 : x #

Patch Set 3 : simpler Sk2s #

Patch Set 4 : more work #

Patch Set 5 : ditch old impls #

Patch Set 6 : neon #

Patch Set 7 : update PMFloat #

Patch Set 8 : rebase #

Patch Set 9 : try union punning #

Patch Set 10 : typo #

Patch Set 11 : pass by ref #

Patch Set 12 : more pass by ref #

Patch Set 13 : Unify in SkNx.h #

Patch Set 14 : restore old apis #

Patch Set 15 : flesh out tests, catch a bug #

Patch Set 16 : derp #

Patch Set 17 : range asserts for [] #

Patch Set 18 : This is actually faster #

Unified diffs Side-by-side diffs Delta from patch set Stats (+794 lines, -1338 lines) Patch
M bench/PMFloatBench.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M gyp/tests.gypi View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M include/effects/SkColorMatrixFilter.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M src/core/Sk2x.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -96 lines 0 comments Download
M src/core/Sk4x.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -123 lines 0 comments Download
M src/core/SkGeometry.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -3 lines 0 comments Download
M src/core/SkMatrix.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +17 lines, -17 lines 0 comments Download
M src/core/SkNx.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +173 lines, -1 line 0 comments Download
M src/core/SkPMFloat.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +28 lines, -40 lines 0 comments Download
M src/core/SkRect.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -11 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +15 lines, -15 lines 0 comments Download
D src/opts/Sk2x_neon.h View 1 2 3 4 1 chunk +0 lines, -158 lines 0 comments Download
D src/opts/Sk2x_none.h View 1 chunk +0 lines, -72 lines 0 comments Download
D src/opts/Sk2x_sse.h View 1 chunk +0 lines, -82 lines 0 comments Download
D src/opts/Sk4x_neon.h View 1 2 3 4 1 chunk +0 lines, -166 lines 0 comments Download
D src/opts/Sk4x_none.h View 1 2 3 4 1 chunk +0 lines, -120 lines 0 comments Download
D src/opts/Sk4x_sse.h View 1 2 3 4 1 chunk +0 lines, -177 lines 0 comments Download
A src/opts/SkNx_neon.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +257 lines, -0 lines 0 comments Download
A src/opts/SkNx_sse.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +190 lines, -0 lines 0 comments Download
M src/opts/SkPMFloat_SSE2.h View 1 2 3 4 5 6 4 chunks +6 lines, -11 lines 0 comments Download
M src/opts/SkPMFloat_SSSE3.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +7 lines, -12 lines 0 comments Download
M src/opts/SkPMFloat_neon.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -8 lines 0 comments Download
M src/opts/SkPMFloat_none.h View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M tests/PMFloatTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
D tests/Sk2xTest.cpp View 1 chunk +0 lines, -68 lines 0 comments Download
D tests/Sk4xTest.cpp View 1 2 3 1 chunk +0 lines, -145 lines 0 comments Download
A tests/SkNxTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (13 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/220001
5 years, 8 months ago (2015-03-30 12:26:42 UTC) #2
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 8 months ago (2015-03-30 12:26:42 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/240001
5 years, 8 months ago (2015-03-30 14:09:48 UTC) #6
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 8 months ago (2015-03-30 14:09:49 UTC) #7
commit-bot: I haz the power
Presubmit check for 1048593002-240001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 8 months ago (2015-03-30 14:09:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/240001
5 years, 8 months ago (2015-03-30 14:49:47 UTC) #11
commit-bot: I haz the power
This issue passed the CQ dry run.
5 years, 8 months ago (2015-03-30 14:56:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/260001
5 years, 8 months ago (2015-03-30 15:31:25 UTC) #15
commit-bot: I haz the power
This issue passed the CQ dry run.
5 years, 8 months ago (2015-03-30 15:49:15 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/280001
5 years, 8 months ago (2015-03-30 16:53:28 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot/builds/207)
5 years, 8 months ago (2015-03-30 16:55:31 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/300001
5 years, 8 months ago (2015-03-30 16:57:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048593002/340001
5 years, 8 months ago (2015-03-30 17:44:49 UTC) #25
commit-bot: I haz the power
Committed patchset #18 (id:340001) as https://skia.googlesource.com/skia/+/c9adb05b64fa0bfadf9d1a782afcda470da68c9e
5 years, 8 months ago (2015-03-30 17:50:31 UTC) #26
reed2
My interpreation of 's' is that scalar may be float or double, hence we use ...
5 years, 8 months ago (2015-03-30 19:55:13 UTC) #28
mtklein
On 2015/03/30 19:55:13, reed2 wrote: > My interpreation of 's' is that scalar may be ...
5 years, 8 months ago (2015-03-30 19:57:08 UTC) #29
reed2
8x and 16x seem like great additions for efficiently capturing unroll semantics.
5 years, 8 months ago (2015-03-30 20:01:09 UTC) #30
mtklein
On 2015/03/30 20:01:09, reed2 wrote: > 8x and 16x seem like great additions for efficiently ...
5 years, 8 months ago (2015-03-30 20:02:18 UTC) #31
reed2
5 years, 8 months ago (2015-03-30 20:03:02 UTC) #32
Message was sent while issue was closed.
great change to SkMatrix.cpp, since before is was float-specific

Powered by Google App Engine
This is Rietveld 408576698