#ifndef HB_ALGS_HH
#define HB_ALGS_HH
#include "hb.hh"
#include "hb-meta.hh"
#include "hb-null.hh"
#include "hb-number.hh"
#include <algorithm>
#include <initializer_list>
#include <functional>
#include <new>
#ifdef _MSC_VER
# pragma warning(disable:4200)
# pragma warning(disable:4800)
#endif
#define HB_MARK_AS_FLAG_T(T) …
#define FLAG(x) …
#define FLAG_UNSAFE(x) …
#define FLAG_RANGE(x,y) …
#define FLAG64(x) …
#define FLAG64_UNSAFE(x) …
static inline constexpr uint16_t hb_uint16_swap (uint16_t v)
{ … }
static inline constexpr uint32_t hb_uint32_swap (uint32_t v)
{ … }
#ifndef HB_FAST_INT_ACCESS
#if defined(__OPTIMIZE__) && \
defined(__BYTE_ORDER) && \
(__BYTE_ORDER == __BIG_ENDIAN || \
(__BYTE_ORDER == __LITTLE_ENDIAN && \
hb_has_builtin(__builtin_bswap16) && \
hb_has_builtin(__builtin_bswap32)))
#define HB_FAST_INT_ACCESS …
#else
#define HB_FAST_INT_ACCESS …
#endif
#endif
template <typename Type, int Bytes = sizeof (Type)>
struct BEInt;
BEInt<Type, 1>;
BEInt<Type, 2>;
BEInt<Type, 3>;
BEInt<Type, 4>;
static inline double
_hb_roundf (double x) { … }
static inline float
_hb_roundf (float x) { … }
#define roundf(x) …
#define HB_CODEPOINT_ENCODE3(x,y,z) …
#define HB_CODEPOINT_DECODE3_1(v) …
#define HB_CODEPOINT_DECODE3_2(v) …
#define HB_CODEPOINT_DECODE3_3(v) …
#define HB_CODEPOINT_ENCODE3_11_7_14(x,y,z) …
#define HB_CODEPOINT_DECODE3_11_7_14_1(v) …
#define HB_CODEPOINT_DECODE3_11_7_14_2(v) …
#define HB_CODEPOINT_DECODE3_11_7_14_3(v) …
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
#define mix(h) …
static inline uint64_t fasthash64(const void *buf, size_t len, uint64_t seed)
{ … }
static inline uint32_t fasthash32(const void *buf, size_t len, uint32_t seed)
{ … }
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
template <unsigned Pos, typename Appl, typename V>
struct hb_partial_t
{ … };
template <unsigned Pos=1, typename Appl, typename V>
auto hb_partial (Appl&& a, V&& v) HB_AUTO_RETURN
(( hb_partial_t<Pos, Appl, V> (a, v) ))
#ifdef _MSC_VER
\
#define HB_PARTIALIZE(Pos) \
template <typename _T> \
decltype(auto) operator () (_T&& _v) const \
{ return hb_partial<Pos> (this, std::forward<_T> (_v)); } \
static_assert (true, "")
#else
#define HB_PARTIALIZE(Pos) …
#endif
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
template <typename T1, typename T2>
struct hb_pair_t
{ … };
template <typename T1, typename T2> static inline hb_pair_t<T1, T2>
hb_pair (T1&& a, T2&& b) { … }
hb_codepoint_pair_t;
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
template <typename T>
static inline unsigned int
hb_popcount (T v)
{ … }
template <typename T>
static inline unsigned int
hb_bit_storage (T v)
{ … }
template <typename T>
static inline unsigned int
hb_ctz (T v)
{ … }
static inline bool ISALPHA (unsigned char c)
{ … }
static inline bool ISALNUM (unsigned char c)
{ … }
static inline bool ISSPACE (unsigned char c)
{ … }
static inline unsigned char TOUPPER (unsigned char c)
{ … }
static inline unsigned char TOLOWER (unsigned char c)
{ … }
static inline bool ISHEX (unsigned char c)
{ … }
static inline unsigned char TOHEX (uint8_t c)
{ … }
static inline uint8_t FROMHEX (unsigned char c)
{ … }
static inline unsigned int DIV_CEIL (const unsigned int a, unsigned int b)
{ … }
#undef ARRAY_LENGTH
template <typename Type, unsigned int n>
static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { … }
#define ARRAY_LENGTH_CONST(__array) …
static inline void *
hb_memcpy (void *__restrict dst, const void *__restrict src, size_t len)
{ … }
static inline int
hb_memcmp (const void *a, const void *b, unsigned int len)
{ … }
static inline void *
hb_memset (void *s, int c, unsigned int n)
{ … }
static inline unsigned int
hb_ceil_to_4 (unsigned int v)
{ … }
template <typename T> static inline bool
hb_in_range (T u, T lo, T hi)
{ … }
template <typename T> static inline bool
hb_in_ranges (T u, T lo1, T hi1)
{ … }
template <typename T, typename ...Ts> static inline bool
hb_in_ranges (T u, T lo1, T hi1, Ts... ds)
{ … }
static inline bool
hb_unsigned_mul_overflows (unsigned int count, unsigned int size, unsigned *result = nullptr)
{ … }
template <typename K, typename V, typename ...Ts>
static int
_hb_cmp_method (const void *pkey, const void *pval, Ts... ds)
{ … }
template <typename K, typename V>
static int
_hb_cmp_operator (const void *pkey, const void *pval)
{ … }
template <typename V, typename K, typename ...Ts>
static inline bool
hb_bsearch_impl (unsigned *pos,
const K& key,
V* base, size_t nmemb, size_t stride,
int (*compar)(const void *_key, const void *_item, Ts... _ds),
Ts... ds)
{ … }
template <typename V, typename K>
static inline V*
hb_bsearch (const K& key, V* base,
size_t nmemb, size_t stride = sizeof (V),
int (*compar)(const void *_key, const void *_item) = _hb_cmp_method<K, V>)
{ … }
template <typename V, typename K, typename ...Ts>
static inline V*
hb_bsearch (const K& key, V* base,
size_t nmemb, size_t stride,
int (*compar)(const void *_key, const void *_item, Ts... _ds),
Ts... ds)
{ … }
#define SORT_R_SWAP(a,b,tmp) …
static inline void sort_r_swap(char *__restrict a, char *__restrict b,
size_t w)
{ … }
template <typename ...Ts>
static inline int sort_r_cmpswap(char *__restrict a,
char *__restrict b, size_t w,
int (*compar)(const void *_a,
const void *_b,
Ts... _ds),
Ts... ds)
{ … }
static inline void sort_r_swap_blocks(char *ptr, size_t na, size_t nb)
{ … }
template <typename ...Ts>
static inline void sort_r_simple(void *base, size_t nel, size_t w,
int (*compar)(const void *_a,
const void *_b,
Ts... _ds),
Ts... ds)
{ … }
static inline void
hb_qsort (void *base, size_t nel, size_t width,
int (*compar)(const void *_a, const void *_b))
{ … }
static inline void
hb_qsort (void *base, size_t nel, size_t width,
int (*compar)(const void *_a, const void *_b, void *_arg),
void *arg)
{ … }
template <typename T, typename T2, typename T3 = int> static inline void
hb_stable_sort (T *array, unsigned int len, int(*compar)(const T2 *, const T2 *), T3 *array2 = nullptr)
{ … }
static inline hb_bool_t
hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *out)
{ … }
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
struct
{ … }
HB_FUNCOBJ(…);
template <typename func_t>
double solve_itp (func_t f,
double a, double b,
double epsilon,
double min_y, double max_y,
double &ya, double &yb, double &y)
{ … }
#endif