这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ jobs:
cxx_flags: -DHWY_DISABLED_TARGETS=0x58
cxx_standard: 17

- name: Clang-18 (VQSort disabled)
extra_deps: clang-18
c_compiler: clang-18
cxx_compiler: clang++-18
# Disable AVX3_SPR/AVX3_ZEN4 targets in GitHub workflow build with
# Clang 16 or later to work around crashes that occur with Clang 16
# or later when some of the Google Highway tests are compiled with
# all x86 targets enabled
cxx_flags: -DHWY_DISABLED_TARGETS=0x58 -DHWY_DISABLE_VQSORT=1
cxx_standard: 17

- name: Clang-18 (C++23)
extra_deps: clang-18
c_compiler: clang-18
Expand Down
3 changes: 2 additions & 1 deletion hwy/contrib/sort/shared-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ static_assert(SortConstants::MaxBufBytes<2>(64) <= 1664, "Unexpectedly high");
#define VQSORT_COMPILER_COMPATIBLE 1
#endif

#if (HWY_TARGET == HWY_SCALAR) || !VQSORT_COMPILER_COMPATIBLE
#if (HWY_TARGET == HWY_SCALAR) || !VQSORT_COMPILER_COMPATIBLE || \
defined(HWY_DISABLE_VQSORT)
#define VQSORT_ENABLED 0
#else
#define VQSORT_ENABLED 1
Expand Down
10 changes: 10 additions & 0 deletions hwy/contrib/sort/sorting_networks-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,16 @@ HWY_NOINLINE void SortingNetwork(Traits st, T* HWY_RESTRICT buf, size_t cols) {
#else
template <class Base>
struct SharedTraits : public Base {};

namespace detail {

// Empty function to avoid a possible -Wpragma-clang-attribute warning if
// compiling with Clang
static HWY_INLINE HWY_MAYBE_UNUSED void HWY_CONCAT(UnusedSortingNetworksFunc,
__LINE__)() {}

} // namespace detail

#endif // VQSORT_ENABLED

} // namespace detail
Expand Down