Make AVX2 pass TSAN
[alexxy/gromacs.git] / src / gromacs / simd / impl_x86_avx_256 / impl_x86_avx_256_util_float.h
index f96fe28ce12f964391bd9a0352af08fcda32d2f6..bb7f2c6116e5829732d512d59a88e7fbf78f8483 100644 (file)
@@ -157,6 +157,10 @@ gatherLoadTranspose(const float *        base,
 
 static const int c_simdBestPairAlignmentFloat = 2;
 
+// With the implementation below, thread-sanitizer can detect false positives.
+// For loading a triplet, we load 4 floats and ignore the last. Another thread
+// might write to this element, but that will not affect the result.
+// On AVX2 we can use a gather intrinsic instead.
 template <int align>
 static inline void gmx_simdcall
 gatherLoadUTranspose(const float *        base,