#ifndef DISTRIBUTED_POINT_FUNCTIONS_DPF_INTERNAL_INT_MOD_N_H_
#define DISTRIBUTED_POINT_FUNCTIONS_DPF_INTERNAL_INT_MOD_N_H_
#include <algorithm>
#include <string>
#include <type_traits>
#include "absl/base/config.h"
#include "absl/container/inlined_vector.h"
#include "absl/log/absl_check.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/string_view.h"
#include "absl/types/span.h"
namespace distributed_point_functions {
namespace dpf_internal {
class IntModNBase { … };
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
class IntModNImpl : public IntModNBase { … };
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
constexpr IntModNImpl<BaseInteger, ModulusType, kModulus> operator+(
IntModNImpl<BaseInteger, ModulusType, kModulus> a,
const IntModNImpl<BaseInteger, ModulusType, kModulus>& b) { … }
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
constexpr IntModNImpl<BaseInteger, ModulusType, kModulus> operator-(
IntModNImpl<BaseInteger, ModulusType, kModulus> a,
const IntModNImpl<BaseInteger, ModulusType, kModulus>& b) { … }
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
constexpr IntModNImpl<BaseInteger, ModulusType, kModulus> operator-(
IntModNImpl<BaseInteger, ModulusType, kModulus> a) { … }
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
constexpr bool operator==(
const IntModNImpl<BaseInteger, ModulusType, kModulus>& a,
const IntModNImpl<BaseInteger, ModulusType, kModulus>& b) { … }
template <typename BaseInteger, typename ModulusType, ModulusType kModulus>
constexpr bool operator!=(
const IntModNImpl<BaseInteger, ModulusType, kModulus>& a,
const IntModNImpl<BaseInteger, ModulusType, kModulus>& b) { … }
}
#ifdef ABSL_HAVE_INTRINSIC_INT128
IntModN;
#else
template <typename BaseInteger, BaseInteger kModulus>
using IntModN = dpf_internal::IntModNImpl<BaseInteger, BaseInteger, kModulus>;
#endif
}
#endif