diff options
| author | Tyge Løvset <[email protected]> | 2022-12-30 19:26:51 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-30 19:26:51 +0100 |
| commit | 9d59845f622fbb9c225bbe32246a3128ad9ec0b1 (patch) | |
| tree | 528ebcc735cdb5d958b987c886d369bc02a11320 /misc/examples/priority.c | |
| parent | 5f57d597cd27aef55adbcb3b452973b0c6e33667 (diff) | |
| parent | e124d8c7377de1dfce45790a196312596f6b9be5 (diff) | |
| download | STC-modified-9d59845f622fbb9c225bbe32246a3128ad9ec0b1.tar.gz STC-modified-9d59845f622fbb9c225bbe32246a3128ad9ec0b1.zip | |
Merge pull request #41 from tylov/allcaps
Allcaps
Diffstat (limited to 'misc/examples/priority.c')
| -rw-r--r-- | misc/examples/priority.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/examples/priority.c b/misc/examples/priority.c index f6e63205..22da6f60 100644 --- a/misc/examples/priority.c +++ b/misc/examples/priority.c @@ -12,22 +12,22 @@ int main() { size_t N = 10000000; stc64_t rng = stc64_new(time(NULL)); stc64_uniform_t dist = stc64_uniform_new(0, N * 10); - c_auto (cpque_i, heap) + c_AUTO (cpque_i, heap) { // Push ten million random numbers to priority queue printf("Push %" c_ZU " numbers\n", N); - c_forrange (N) + c_FORRANGE (N) cpque_i_push(&heap, stc64_uniform(&rng, &dist)); // push some negative numbers too. - c_forlist (i, int, {-231, -32, -873, -4, -343}) + c_FORLIST (i, int, {-231, -32, -873, -4, -343}) cpque_i_push(&heap, *i.ref); - c_forrange (N) + c_FORRANGE (N) cpque_i_push(&heap, stc64_uniform(&rng, &dist)); puts("Extract the hundred smallest."); - c_forrange (100) { + c_FORRANGE (100) { printf("%" PRId64 " ", *cpque_i_top(&heap)); cpque_i_pop(&heap); } |
