Skip to content

Commit

Permalink
Try to fix ubuntu fail
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-mc committed Nov 16, 2024
1 parent fb9be5b commit f9ba138
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 2 additions & 5 deletions pyfastutil/src/utils/simd/BitonicSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include "utils/memory/AlignedAllocator.h"
#include "utils/memory/PreFetch.h"

template <typename T>
concept IntOrLongLong = std::same_as<T, int> || std::same_as<T, long long>;

namespace simd {
#if !defined(__arm__) && !defined(__arm64__)
struct alignas(32) AVX2_MARKS {
Expand Down Expand Up @@ -374,7 +371,7 @@ namespace simd {
* Merge sorted blocks with SIMD optimization, or fallback
* make sure aligned
*/
template <IntOrLongLong T>
template <typename T, typename = std::enable_if_t<std::is_same_v<T, int> || std::is_same_v<T, long long>>>
__forceinline void mergeSortedBlocks(std::vector<T, AlignedAllocator<T, 64>> &data, const size_t &blockSize) {
const size_t total = data.size();
auto temp = std::vector<T, AlignedAllocator<T, 64>>(total);
Expand Down Expand Up @@ -408,7 +405,7 @@ namespace simd {
/**
* Merge sorted blocks with SIMD optimization reversed, or fallback
*/
template <IntOrLongLong T>
template <typename T, typename = std::enable_if_t<std::is_same_v<T, int> || std::is_same_v<T, long long>>>
__forceinline void
mergeSortedBlocksReversed(std::vector<T, AlignedAllocator<T, 64>> &data, const size_t &blockSize) {
const size_t total = data.size();
Expand Down
3 changes: 1 addition & 2 deletions tests/benchmark/benchmark_BigIntArrayList.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def python_sort():

def pyfastutil_sort():
global pyFastUtilList
# pyFastUtilList.sort()
print("Skipped sort.")
pyFastUtilList.sort()


def python_append():
Expand Down
3 changes: 1 addition & 2 deletions tests/benchmark/benchmark_IntArrayList.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def python_sort():

def pyfastutil_sort():
global pyFastUtilList
# pyFastUtilList.sort()
print("skipped sort")
pyFastUtilList.sort()


def python_append():
Expand Down

0 comments on commit f9ba138

Please sign in to comment.