Add std/png decoder.filter_1_distance_4_arm_neon

On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_png_decode_filt_1_dist_4/clang9                     1.09GB/s ± 1%  1.42GB/s ± 0%  +30.50%  (p=0.008 n=5+5)
wuffs_png_decode_filt_1_dist_4/gcc8                        859MB/s ± 0%   891MB/s ± 0%   +3.66%  (p=0.008 n=5+5)
This commit is contained in:
Nigel Tao committed 2021-02-14 21:43:56 +11:00
1 parent 84f3592dbe
commit 435330494e
10 files changed
+187 -3

No files matched your search

+4
View File
@@ -76,6 +76,8 @@ var (
typeExprDecodeFrameOptions = a.NewTypeExpr(0, t.IDBase, t.IDDecodeFrameOptions, nil, nil, nil)
typeExprARMCRC32U32 = a.NewTypeExpr(0, t.IDBase, t.IDARMCRC32U32, nil, nil, nil)
typeExprARMNeon64 = a.NewTypeExpr(0, t.IDBase, t.IDARMNeon64, nil, nil, nil)
typeExprARMNeon128 = a.NewTypeExpr(0, t.IDBase, t.IDARMNeon128, nil, nil, nil)
typeExprX86M128I = a.NewTypeExpr(0, t.IDBase, t.IDX86M128I, nil, nil, nil)
typeExprSliceU8 = a.NewTypeExpr(t.IDSlice, 0, 0, nil, nil, typeExprU8)
@@ -127,6 +129,8 @@ var builtInTypeMap = typeMap{
t.IDDecodeFrameOptions: typeExprDecodeFrameOptions,
t.IDARMCRC32U32: typeExprARMCRC32U32,
t.IDARMNeon64: typeExprARMNeon64,
t.IDARMNeon128: typeExprARMNeon128,
t.IDX86M128I: typeExprX86M128I,
}
+2
View File
@@ -54,6 +54,8 @@ func (q *checker) tcheckCPUArchBits(cab cpuArchBits, typ *a.TypeExpr) error {
switch qid[1] {
case t.IDARMCRC32U32:
need = cpuArchBitsARMCRC32
case t.IDARMNeon64, t.IDARMNeon128:
need = cpuArchBitsARMNeon
case t.IDX86M128I:
need = cpuArchBitsX86SSE42
}