Skip to content
Merged
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
13 changes: 13 additions & 0 deletions src/avx2-64bit-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,19 @@ struct avx2_vector<uint64_t> {
return v;
}
};

/*
* workaround on 64-bit macOS which defines size_t as unsigned long and defines
* uint64_t as unsigned long long, both of which are 8 bytes
*/
#if defined(__APPLE__) && defined(__x86_64__)
static_assert(sizeof(size_t) == sizeof(uint64_t),
"Size of size_t and uint64_t are not the same");
template <>
struct avx2_vector<size_t> : public avx2_vector<uint64_t> {
};
#endif

template <>
struct avx2_vector<double> {
using type_t = double;
Expand Down