From 8aeb51cf4443e7f7790217dd13d3bdae6f7c3b78 Mon Sep 17 00:00:00 2001 From: Jimmy Lu Date: Thu, 14 Nov 2024 18:08:37 -0800 Subject: [PATCH] fix: SSE only build (#11542) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/11542 Reviewed By: parmeet Differential Revision: D65975193 fbshipit-source-id: db10d9a711c09cfb415b15062557a42b469e8fb8 --- velox/common/base/SimdUtil-inl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/velox/common/base/SimdUtil-inl.h b/velox/common/base/SimdUtil-inl.h index 04d0628338c9..be88b940e3a7 100644 --- a/velox/common/base/SimdUtil-inl.h +++ b/velox/common/base/SimdUtil-inl.h @@ -1453,6 +1453,8 @@ using CharVector = xsimd::batch; extern const int kPageSize; +#if VELOX_SIMD_STRSTR + FOLLY_ALWAYS_INLINE bool pageSafe(const void* const ptr) { return ((kPageSize - 1) & reinterpret_cast(ptr)) <= kPageSize - CharVector::size; @@ -1523,6 +1525,8 @@ size_t FOLLY_ALWAYS_INLINE smidStrstrMemcmp( return std::string::npos; }; +#endif + } // namespace detail /// A faster implementation for std::find, about 2x faster than string_view`s