skia2/include
Michael Ludwig 4621ef2a8a Improve skvx::any() and all() intrinsics
Removes specializations for all() on AVX2 and SSE 4.1, which give the
wrong results if the ints didn't have all bits set (inconsistent with
other platforms and non-SIMD). Added a unit test that checks this case.

The mirror specializations for any() on AVX2 and SSE 4.1 are actually
valid, so added those, and added a 2 instruction specialization for
SSE for any() and all(). This is what clang-trunk produces on -O3, but
ToT clang struggles to vectorize it.

Also adds specializations for NEON for any() and all(), since even
clang-trunk was struggling to vectorize it automatically. In
particular, this will help skgpu::graphite::Rect's implementations of
intersect and contains, which use any/all to get a final boolean value.
In the Instruments app, I had see Rect's intersection as a hotspot
on the Mac M1, and this vectorization helps a bit.

Also takes the opportunity to remove fake C++14 constexpr for a
real constexpr.

Change-Id: Ib142e305ae5615056a777424e379b6da82d44f0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542296
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-20 00:50:59 +00:00
..
android [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
c [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
codec [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
config [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
core Make float color versions of SkBitmap::clear 2022-05-19 23:25:06 +00:00
docs [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
effects Add #version directive to SkSL 2022-05-17 15:42:31 +00:00
encode [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
gpu [graphite] Remove DepthStencilOnly handling 2022-05-19 15:16:37 +00:00
pathops [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
ports [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
private Improve skvx::any() and all() intrinsics 2022-05-20 00:50:59 +00:00
sksl Eliminate vtable from DSLVar class hierarchy. 2022-05-19 19:57:19 +00:00
svg [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
third_party [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
utils [bazel] Put licenses() after legacy_exports 2022-05-02 15:04:33 +00:00
OWNERS Add Bazel folks as owners to BUILD.bazel files 2021-11-09 14:24:54 +00:00