mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-16 07:46:27 -04:00
Disable multiversioning on non-x86 platforms
This commit is contained in:
parent
c57a0a67ce
commit
eddce26ac4
@ -36,3 +36,7 @@
|
||||
#define DWARFS_SANITIZE_THREAD 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(DWARFS_SANITIZE_THREAD) && defined(__x86_64__)
|
||||
#define DWARFS_MULTIVERSIONING 1
|
||||
#endif
|
||||
|
@ -51,7 +51,7 @@ class nilsimsa {
|
||||
void update(uint8_t const* data, size_t size);
|
||||
std::vector<uint64_t> finalize() const;
|
||||
|
||||
#ifndef DWARFS_SANITIZE_THREAD
|
||||
#ifdef DWARFS_MULTIVERSIONING
|
||||
__attribute__((target("popcnt"))) static int
|
||||
similarity(uint64_t const* a, uint64_t const* b);
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace dwarfs {
|
||||
} \
|
||||
static_assert(true, "")
|
||||
|
||||
#ifndef DWARFS_SANITIZE_THREAD
|
||||
#ifdef DWARFS_MULTIVERSIONING
|
||||
#ifdef __clang__
|
||||
__attribute__((target("arch=skylake"))) DWARFS_FIND_SIMILAR_INODE_IMPL;
|
||||
#endif
|
||||
|
@ -197,7 +197,7 @@ void nilsimsa::update(uint8_t const* data, size_t size) {
|
||||
|
||||
std::vector<uint64_t> nilsimsa::finalize() const { return impl_->finalize(); }
|
||||
|
||||
#ifndef DWARFS_SANITIZE_THREAD
|
||||
#ifdef DWARFS_MULTIVERSIONING
|
||||
__attribute__((target("popcnt"))) int
|
||||
nilsimsa::similarity(uint64_t const* a, uint64_t const* b) {
|
||||
DWARFS_NILSIMSA_SIMILARITY(return, a, b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user