folly::find_fixed_detail::findSplitFirstRegister

Searches a fixed-size range by splitting off a leading SIMD register.

Synopsis

Declared in <folly/algorithm/simd/FindFixed.h>

template<
    typename T,
    std::size_t N>
std::optional<std::size_t>
findSplitFirstRegister(
    std::span<T const, N> where,
    T x);

Return Value

Index of the first matching element, or std::nullopt if not found.

Parameters

NameDescription
whereThe fixed-size range to search.
xThe value to search for.