3#ifndef TETL_FUNCTIONAL_FNV1A_HPP
4#define TETL_FUNCTIONAL_FNV1A_HPP
6#include <etl/_config/all.hpp>
8#include <etl/_cstddef/size_t.hpp>
9#include <etl/_cstdint/uint_t.hpp>
13template <
typename UInt, UInt Prime, UInt Offset>
15 using result_type = UInt;
19 auto operator()(
void const* data,
etl::size_t len)
noexcept ->
void
21 auto const* p =
static_cast<
etl::uint8_t
const*>(data);
22 TETL_NO_UNROLL
while ((len--) != 0U)
24 _h ^=
static_cast<UInt>(*p++);
35 result_type _h{Offset};
38using fnv1a32 =
fnv1a<
etl::uint32_t, 0x01000193, 0x811c9dc5>;
39using fnv1a64 =
fnv1a<
etl::uint64_t, 0x00000100000001b3, 0xcbf29ce484222325>;
Definition adjacent_find.hpp:9
operator result_type() const noexcept
Definition fnv1a.hpp:29
auto operator()(void const *data, etl::size_t len) noexcept -> void
Definition fnv1a.hpp:19