Skip to content

Commit

Permalink
Disable vectorized conversion with tsan
Browse files Browse the repository at this point in the history
Summary: The method convertVectorized() doesn't work with tsan, let's force the non-optimized code when tsan is active.

Reviewed By: hanghu

Differential Revision: D65923660

fbshipit-source-id: 79314587187a797968c721b954f71e1ce1572413
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Nov 14, 2024
1 parent f511a18 commit 3c709a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vrs/utils/converters/Raw10ToGrey10Converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ bool convertRaw10ToGrey10(

const bool canVectorize = kHasSimdAcceleration && (contiguous || canFullyVectorizeRows);

if (canVectorize) {
#if defined(__has_feature) && __has_feature(thread_sanitizer)
const bool tsan = true;
#else
const bool tsan = false;
#endif

if (canVectorize && !tsan) {
convertVectorized(dst, src, widthInPixels, heightInPixels, strideInBytes, contiguous);
} else {
// Non-SIMD fallback
Expand Down

0 comments on commit 3c709a8

Please sign in to comment.