7#ifndef SECP256K1_HSORT_IMPL_H
8#define SECP256K1_HSORT_IMPL_H
27 unsigned char tmp[64];
35 unsigned char *a = arr + i*stride;
36 unsigned char *b = arr + j*stride;
52 int (*cmp)(
const void *,
const void *,
void *),
void *cmp_data) {
53 while (i < heap_size/2) {
109 int (*cmp)(
const void *,
const void *,
void *),
113 for (i =
count/2; 0 < i; --i) {
116 for (i =
count; 1 < i; --i) {
static SECP256K1_INLINE size_t secp256k1_heap_child2(size_t i)
static void secp256k1_hsort(void *ptr, size_t count, size_t size, int(*cmp)(const void *, const void *, void *), void *cmp_data)
static SECP256K1_INLINE void secp256k1_heap_swap(unsigned char *arr, size_t i, size_t j, size_t stride)
static SECP256K1_INLINE size_t secp256k1_heap_child1(size_t i)
static SECP256K1_INLINE void secp256k1_heap_down(unsigned char *arr, size_t i, size_t heap_size, size_t stride, int(*cmp)(const void *, const void *, void *), void *cmp_data)
static SECP256K1_INLINE void secp256k1_heap_swap64(unsigned char *a, unsigned char *b, size_t len)
#define VERIFY_CHECK(cond)