#ifndef DISTRIBUTED_POINT_FUNCTIONS_DPF_DISTRIBUTED_POINT_FUNCTION_H_
#define DISTRIBUTED_POINT_FUNCTIONS_DPF_DISTRIBUTED_POINT_FUNCTION_H_
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include "absl/container/btree_map.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/inlined_vector.h"
#include "absl/log/absl_check.h"
#include "absl/meta/type_traits.h"
#include "absl/numeric/int128.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "dpf/aes_128_fixed_key_hash.h"
#include "dpf/distributed_point_function.pb.h"
#include "dpf/internal/evaluate_prg_hwy.h"
#include "dpf/internal/maybe_deref_span.h"
#include "dpf/internal/proto_validator.h"
#include "dpf/internal/value_type_helpers.h"
#include "google/protobuf/repeated_ptr_field.h"
#include "hwy/aligned_allocator.h"
namespace distributed_point_functions {
is_supported_type;
is_supported_type_v;
template <typename T, typename = absl::enable_if_t<is_supported_type_v<T>>>
absl::StatusOr<T> FromValue(const Value& value) { … }
template <typename T, typename = absl::enable_if_t<is_supported_type_v<T>>>
Value ToValue(const T& input) { … }
template <typename T, typename = absl::enable_if_t<is_supported_type_v<T>>>
ValueType ToValueType() { … }
class DistributedPointFunction { … };
template <typename T>
absl::Status DistributedPointFunction::RegisterValueTypeImpl(
absl::flat_hash_map<std::string, ValueCorrectionFunction>&
value_correction_functions) { … }
template <typename T0, typename... Tn, typename >
absl::StatusOr<std::pair<DpfKey, DpfKey>>
DistributedPointFunction::GenerateKeysIncremental(absl::uint128 alpha,
T0&& beta_0, Tn&&... beta_n) { … }
template <typename T>
absl::StatusOr<std::vector<T>> DistributedPointFunction::EvaluateUntil(
int hierarchy_level, absl::Span<const absl::uint128> prefixes,
EvaluationContext& ctx) const { … }
template <typename T>
absl::StatusOr<std::array<T, dpf_internal::ElementsPerBlock<T>()>>
DistributedPointFunction::GetValueCorrectionAsArray(const DpfKey& key,
int hierarchy_level) const { … }
template <typename T>
absl::StatusOr<std::vector<T>> DistributedPointFunction::EvaluateAtImpl(
const DpfKey& key, int hierarchy_level,
absl::Span<const absl::uint128> evaluation_points,
EvaluationContext* ctx) const { … }
template <typename T, typename Fn>
absl::Status DistributedPointFunction::EvaluateAndApply(
dpf_internal::MaybeDerefSpan<const DpfKey> keys,
absl::Span<const absl::uint128> evaluation_points, Fn op,
int evaluation_points_rightshift) const { … }
}
#endif