Commit graph

11 commits

Author SHA1 Message Date
Nico Weber 3cb83860fa LibGfx/PNGWriter+AK: SIMDify paeth predictor more
Takes

    (cd Tests/LibGfx; ../../Build/lagom/bin/BenchmarkPNG)

from 59ms to 32ms on my system.

Adds AK::SIMD::bitselect() (modeled after the wasm SIMD equivalent),
and AK::SIMD::abs() implemented on top of it.

No behavior change.
2024-08-10 13:07:01 -04:00
Hendiadyoin1 832b5ff603 AK: Add simd_cast<T> and replace to_TxN with it 2024-08-08 22:43:53 -04:00
Dan Klishch 56b7f9e404 Meta: Globally disable -Wpsabi
This warning is triggered when one accepts or returns vectors from a
function (that is not marked with [[gnu::target(...)]]) which would have
been otherwise passed in register if the current translation unit had
been compiled with more permissive flags wrt instruction selection (i.
e. if one adds -mavx2 to cmdline). This will never be a problem for us
since we (a) never use different instruction selection options across
ABI boundaries; (b) most of the affected functions are actually
TU-local.

Moreover, even if we somehow properly annotated all of the SIMD helpers,
calling them across ABI (or target) boundaries would still be very
dangerous because of inconsistent and bogus handling of
[[gnu::target(...)]] across compilers. See
https://github.com/llvm/llvm-project/issues/64706 and
https://www.reddit.com/r/cpp/comments/17qowl2/comment/k8j2odi .
2024-07-12 18:30:07 -04:00
Nico Weber 41f57a5477 AK: Remove the SIMD version of rsqrt() too, for good measure
No strong reason to remove this one, other than that it's also unused.
2024-01-30 10:02:33 +01:00
Dan Klishch 4536b80a62 AK+readelf: Issue error when using ARCH(arch) with nonexistent arch
This disallows erroneous `#if ARCH(x86_64)` (note lowercase x).
2023-03-03 21:53:41 +01:00
Jelle Raaijmakers f4342c9118 AK: Add AK::SIMD::exp_approximate
This approximation tries to generate values within 0.1% of their actual
expected value. Microbenchmarks indicate that this iterative SIMD
version can be up to 60x faster than `AK::SIMD::exp`.
2023-02-18 01:45:00 +01:00
Liav A feeb25bcee AK: Remove i686 support 2022-12-28 11:53:41 +01:00
Jelle Raaijmakers 2c381ea45c AK: Add clamp(f32x4, float, float)
We are allowed to directly compare `f32x4` with a `float`, so make use
of it.
2022-05-09 21:49:48 +02:00
Hendiadyoin1 5ba5a6615d AK: Add vector variants of sqrt and rsqrt 2022-04-02 18:37:38 +02:00
Stephan Unverwerth f9c5c120f6 AK/SIMD: Suppress psabi warnings and add explanatory comment 2022-01-09 21:03:08 +01:00
Stephan Unverwerth 444a15bad3 AK: Add SIMDMath.h with vectorized version of math functions 2022-01-09 16:21:13 +03:30