47 if (
likely (!
a.successful || !
b.successful))
49 hb_swap (
a.population,
b.population);
50 hb_swap (
a.last_page_lookup,
b.last_page_lookup);
51 hb_swap (
a.page_map,
b.page_map);
52 hb_swap (
a.pages,
b.pages);
73 int cmp (uint32_t o_major)
const {
return (
int) o_major - (int)
major; }
115 for (
unsigned int i = 0;
i <
count;
i++)
120 explicit operator bool ()
const {
return !
is_empty (); }
151 for (
unsigned int m = ma + 1;
m < mb;
m++)
163 template <
typename T>
188 template <
typename T>
191 template <
typename T>
194 template <
typename T>
197 template <
typename T>
202 template <
typename T>
219 if (
g < last_g)
return false;
233 template <
typename T>
236 template <
typename T>
239 template <
typename T>
242 template <
typename T>
256 void del_pages (
int ds,
int de)
263 if (
unlikely (!allocate_compact_workspace (compact_workspace)))
return;
265 unsigned int write_index = 0;
269 if (
m < ds || de <
m)
272 compact (compact_workspace, write_index);
287 int ds = (
a ==
major_start (ma))? (
int) ma: (int) (ma + 1);
288 int de = (
b + 1 ==
major_start (mb + 1))? (
int) mb: ((int) mb - 1);
289 if (ds > de || (
int) ma < ds)
300 if (de < (
int) mb && ma != mb)
314 return page->get (
g);
327 {
add (
v);
return *
this; }
334 return next (&
c) &&
c <= last;
355 unsigned int na =
pages.length;
356 unsigned int nb =
other.pages.length;
358 unsigned int a = 0,
b = 0;
359 for (;
a < na &&
b < nb; )
362 if (
other.page_at (
b).is_empty ()) {
b++;
continue; }
372 if (!
other.page_at (
b).is_empty ()) {
return false; }
384 for (uint32_t lpi = 0; spi <
page_map.length && lpi < larger_set.
page_map.length; lpi++)
387 uint32_t lpm = larger_set.
page_map[lpi].major;
389 auto lp = larger_set.
page_at (lpi);
391 if (spm < lpm && !
sp.is_empty ())
397 if (!
sp.is_subset (lp))
436 compact_pages (old_index_to_page_map_index);
440 unsigned int write_index = 0;
441 for (
unsigned int i = 0;
i <
pages.length;
i++)
443 if (old_index_to_page_map_index[
i] == 0xFFFFFFFF)
continue;
448 page_map[old_index_to_page_map_index[
i]].index = write_index;
454 template <
typename Op>
457 const bool passthru_left =
op (1, 0);
458 const bool passthru_right =
op (0, 1);
464 unsigned int na =
pages.length;
465 unsigned int nb =
other.pages.length;
466 unsigned int next_page = na;
468 unsigned int count = 0, newCount = 0;
469 unsigned int a = 0,
b = 0;
470 unsigned int write_index = 0;
475 if (!passthru_left &&
unlikely (!allocate_compact_workspace (compact_workspace)))
return;
477 for (;
a < na &&
b < nb; )
517 next_page = write_index;
518 compact (compact_workspace, write_index);
594 const auto* page_map_array =
page_map.arrayZ;
595 unsigned int major =
get_major (*codepoint);
607 const auto* pages_array =
pages.arrayZ;
611 if (pages_array[current.
index].next (codepoint))
654 for (; (int)
i >= 0;
i--)
679 while (
next (&
i) &&
i == *last + 1)
705 unsigned int size)
const
708 unsigned int start_page = 0;
709 unsigned int start_page_value = 0;
712 const auto* page_map_array =
page_map.arrayZ;
713 unsigned int major =
get_major (codepoint);
723 if (
unlikely (start_page_value == 0))
727 start_page_value = 0;
731 unsigned int initial_size =
size;
738 start_page_value = 0;
740 return initial_size -
size;
745 unsigned int size)
const
747 unsigned int initial_size =
size;
749 unsigned int start_page = 0;
750 unsigned int start_page_value = 0;
753 const auto* page_map_array =
page_map.arrayZ;
754 unsigned int major =
get_major (codepoint);
767 return initial_size -
size;
772 if (
unlikely (start_page_value == 0))
776 start_page_value = 0;
787 start_page_value = 0;
790 *
out++ = next_value++;
793 return initial_size -
size;
802 unsigned int pop = 0;
804 for (
unsigned int i = 0;
i <
count;
i++)
813 for (
unsigned i = 0;
i <
count;
i++)
818 if (!
page.is_empty ())
826 for (
signed i =
count - 1;
i >= 0;
i--)
831 if (!
page.is_empty ())
850 l =
s->get_population () + 1;
863 {
return s !=
o.
s ||
v !=
o.v; }
small capitals from c petite p scientific i
[1]
map insert("Paris", "France")
QMap< QString, QString > map
[6]
@ HB_NOT_FOUND_STORE_CLOSEST
void hb_fill(C &&c, const V &v)
JDIMENSION DCTELEM * workspace
void *PRIV() memmove(void *d, const void *s, size_t n)
set set set set set set set macro pixldst1 op
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
const void GLsizei GLsizei stride
#define HB_SET_VALUE_INVALID
QTextStream out(stdout)
[7]
static constexpr hb_codepoint_t INVALID
static constexpr unsigned PAGE_BITS
static constexpr unsigned PAGE_BITS_LOG_2
static constexpr unsigned PAGE_BITMASK
iter_t(const hb_bit_set_t &s_=Null(hb_bit_set_t), bool init=true)
static constexpr bool is_sorted_iterator
hb_codepoint_t __item_t__
bool operator!=(const iter_t &o) const
hb_codepoint_t __item__() const
int cmp(uint32_t o_major) const
int cmp(const page_map_t &o) const
bool get(hb_codepoint_t g) const
page_t & page_at(unsigned int i)
bool is_equal(const hb_bit_set_t &other) const
bool previous_range(hb_codepoint_t *first, hb_codepoint_t *last) const
static constexpr hb_codepoint_t INVALID
void add_array(const hb_array_t< const T > &arr)
void add_array(const T *array, unsigned int count, unsigned int stride=sizeof(T))
hb_codepoint_t major_start(unsigned int major) const
bool has(hb_codepoint_t k) const
unsigned int get_population() const
bool next(hb_codepoint_t *codepoint) const
void subtract(const hb_bit_set_t &other)
bool add_range(hb_codepoint_t a, hb_codepoint_t b)
hb_codepoint_t get_max() const
bool set_sorted_array(bool v, const T *array, unsigned int count, unsigned int stride=sizeof(T))
void del_range(hb_codepoint_t a, hb_codepoint_t b)
unsigned int page_remainder(hb_codepoint_t g) const
const page_t * page_for(hb_codepoint_t g) const
bool add_sorted_array(const T *array, unsigned int count, unsigned int stride=sizeof(T))
friend void swap(hb_bit_set_t &a, hb_bit_set_t &b)
bool del_sorted_array(const T *array, unsigned int count, unsigned int stride=sizeof(T))
void symmetric_difference(const hb_bit_set_t &other)
static constexpr bool SENTINEL
void del(hb_codepoint_t g)
bool is_subset(const hb_bit_set_t &larger_set) const
bool del_sorted_array(const hb_sorted_array_t< const T > &arr)
page_t * page_for(hb_codepoint_t g, bool insert=false)
bool operator()(hb_codepoint_t k) const
unsigned int get_major(hb_codepoint_t g) const
void process(const Op &op, const hb_bit_set_t &other)
hb_codepoint_t get_min() const
bool has_population() const
void intersect(const hb_bit_set_t &other)
hb_bit_set_t(hb_bit_set_t &&other)
void union_(const hb_bit_set_t &other)
const page_t & page_at(unsigned int i) const
void set_array(bool v, const T *array, unsigned int count, unsigned int stride=sizeof(T))
void add(hb_codepoint_t g)
unsigned int next_many(hb_codepoint_t codepoint, hb_codepoint_t *out, unsigned int size) const
bool resize(unsigned int count)
unsigned int last_page_lookup
bool add_sorted_array(const hb_sorted_array_t< const T > &arr)
void set(const hb_bit_set_t &other)
bool previous(hb_codepoint_t *codepoint) const
void del_array(const hb_array_t< const T > &arr)
void del_array(const T *array, unsigned int count, unsigned int stride=sizeof(T))
bool next_range(hb_codepoint_t *first, hb_codepoint_t *last) const
hb_bit_set_t & operator<<(hb_codepoint_t v)
hb_bit_set_t(const hb_bit_set_t &other)
value_t operator[](hb_codepoint_t k) const
bool intersects(hb_codepoint_t first, hb_codepoint_t last) const
hb_sorted_vector_t< page_map_t > page_map
hb_bit_set_t & operator=(const hb_bit_set_t &other)
unsigned int next_many_inverted(hb_codepoint_t codepoint, hb_codepoint_t *out, unsigned int size) const
hb_vector_t< page_t > pages