Example #1
0
void rkvsorti(size_t n, rkv_t *base)
{
#define rkey_lt(a, b) ((a)->key < (b)->key)
  GK_MKQSORT(rkv_t, base, n, rkey_lt);
#undef rkey_lt
}
Example #2
0
void simsortd(size_t n, sim_t *base)
{
#define sim_gt(a, b) ((a)->sim.f > (b)->sim.f)
    GK_MKQSORT(sim_t, base, n, sim_gt);
#undef sim_gt
}
Example #3
0
/* Sorts based both on key and val */
void ikvsortii(size_t n, ikv_t *base)
{
#define ikeyval_lt(a, b) ((a)->key < (b)->key || ((a)->key == (b)->key && (a)->val < (b)->val))
  GK_MKQSORT(ikv_t, base, n, ikeyval_lt);
#undef ikeyval_lt
}
Example #4
0
void ikvsortd(size_t n, ikv_t *base)
{
#define ikey_gt(a, b) ((a)->key > (b)->key)
  GK_MKQSORT(ikv_t, base, n, ikey_gt);
#undef ikey_gt
}
Example #5
0
void rsortd(size_t n, real_t *base)
{
#define r_gt(a, b) ((*a) > (*b))
  GK_MKQSORT(real_t, base, n, r_gt);
#undef r_gt
}
Example #6
0
void ikvsorti(size_t n, ikv_t *base)
{
#define ikey_lt(a, b) ((a)->key < (b)->key)
  GK_MKQSORT(ikv_t, base, n, ikey_lt);
#undef ikey_lt
}
Example #7
0
void rsorti(size_t n, real_t *base)
{
#define r_lt(a, b) ((*a) < (*b))
  GK_MKQSORT(real_t, base, n, r_lt);
#undef r_lt
}
Example #8
0
void isortd(size_t n, idx_t *base)
{
#define i_gt(a, b) ((*a) > (*b))
  GK_MKQSORT(idx_t, base, n, i_gt);
#undef i_gt
}
Example #9
0
void isorti(size_t n, idx_t *base)
{
#define i_lt(a, b) ((*a) < (*b))
  GK_MKQSORT(idx_t, base, n, i_lt);
#undef i_lt
}
Example #10
0
void uvwsorti(size_t n, uvw_t *base)
{
#define uvwkey_lt(a, b) ((a)->u < (b)->u || ((a)->u == (b)->u && (a)->v < (b)->v))
  GK_MKQSORT(uvw_t, base, n, uvwkey_lt);
#undef uvwkey_lt
}
Example #11
0
void rkvsortd(size_t n, rkv_t *base)
{
#define rkey_gt(a, b) ((a)->key > (b)->key)
  GK_MKQSORT(rkv_t, base, n, rkey_gt);
#undef rkey_gt
}