diff options
| author | 2024-04-02 11:03:40 +0100 | |
|---|---|---|
| committer | 2024-04-02 12:03:40 +0200 | |
| commit | adf345f1ec0cb76a0df94a4505143d891659cba9 (patch) | |
| tree | e0cca289c0a50f30191d4b65a2c336704570e470 /vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go | |
| parent | [feature] Option to hide followers/following (#2788) (diff) | |
| download | gotosocial-adf345f1ec0cb76a0df94a4505143d891659cba9.tar.xz | |
[chore] bump go structr cache version -> v0.6.0 (#2773)
* update go-structr library -> v0.6.0, add necessary wrapping types + code changes to support these changes
* update readme with go-structr package changes
* improved wrapping of the SliceCache type
* add code comments for the cache wrapper types
* remove test.out :innocent:
---------
Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go')
| -rw-r--r-- | vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go b/vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go deleted file mode 100644 index 9baff6c41..000000000 --- a/vendor/github.com/zeebo/xxh3/accum_stubs_amd64.go +++ /dev/null @@ -1,40 +0,0 @@ -package xxh3 - -import ( - "unsafe" - - "github.com/klauspost/cpuid/v2" -) - -var ( - hasAVX2 = cpuid.CPU.Has(cpuid.AVX2) - hasSSE2 = cpuid.CPU.Has(cpuid.SSE2) // Always true on amd64 - hasAVX512 = cpuid.CPU.Has(cpuid.AVX512F) -) - -//go:noescape -func accumAVX2(acc *[8]u64, data, key unsafe.Pointer, len u64) - -//go:noescape -func accumAVX512(acc *[8]u64, data, key unsafe.Pointer, len u64) - -//go:noescape -func accumSSE(acc *[8]u64, data, key unsafe.Pointer, len u64) - -//go:noescape -func accumBlockAVX2(acc *[8]u64, data, key unsafe.Pointer) - -//go:noescape -func accumBlockSSE(acc *[8]u64, data, key unsafe.Pointer) - -func withOverrides(avx512, avx2, sse2 bool, cb func()) { - avx512Orig, avx2Orig, sse2Orig := hasAVX512, hasAVX2, hasSSE2 - hasAVX512, hasAVX2, hasSSE2 = avx512, avx2, sse2 - defer func() { hasAVX512, hasAVX2, hasSSE2 = avx512Orig, avx2Orig, sse2Orig }() - cb() -} - -func withAVX512(cb func()) { withOverrides(hasAVX512, false, false, cb) } -func withAVX2(cb func()) { withOverrides(false, hasAVX2, false, cb) } -func withSSE2(cb func()) { withOverrides(false, false, hasSSE2, cb) } -func withGeneric(cb func()) { withOverrides(false, false, false, cb) } |
