This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename Comparator> | |
HOT ssize_t forward_lower_bound(std::span<const T> data, const T elem, const Comparator &comp) noexcept | |
{ | |
static_assert(std::is_integral<T>::value, "T must be an integral type"); | |
static_assert(std::hardware_constructive_interference_size == 64, "Cache line size must be 64 bytes"); | |
static constexpr uint8_t chunk_size = sizeof(__m512i) / sizeof(T); | |
const T *begin = data.data(); | |
const size_t size = data.size(); | |
size_t remaining = size; |
OlderNewer