aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2024-04-24 15:24:23 +0200
committerTor Egge <Tor.Egge@online.no>2024-04-24 15:24:23 +0200
commit4f55242ae369f5156339994cb51162fd469416ec (patch)
treeebb3e082f9b12d3e01b3860637777f1b008175f1 /vespalib
parent117cace612ab00de27b8ec5e77896056e449bf33 (diff)
Disable thread sanitizer instrumentation for anonymous get function
used by accelerated bitwise and/or. Source bitvectors might be modified due to feeding during search.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp b/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp
index 6731b449462..278131eaf15 100644
--- a/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp
+++ b/vespalib/src/vespa/vespalib/hwaccelrated/private_helpers.hpp
@@ -2,6 +2,7 @@
#pragma once
+#include <vespa/config.h>
#include <vespa/vespalib/util/optimized.h>
#include <cstring>
@@ -24,6 +25,11 @@ populationCount(const uint64_t *a, size_t sz) {
return count;
}
+#ifdef VESPA_USE_THREAD_SANITIZER
+template<typename T, unsigned ChunkSize>
+T get(const void * base, bool invert)__attribute__((no_sanitize("thread")));
+#endif
+
template<typename T, unsigned ChunkSize>
T get(const void * base, bool invert) {
static_assert(sizeof(T) == ChunkSize, "sizeof(T) == ChunkSize");