diff options
| author | Tyge Løvset <[email protected]> | 2020-07-29 16:02:04 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-07-29 16:02:04 +0200 |
| commit | 5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48 (patch) | |
| tree | 542b15e8dbf14a419128f9364c59768d073535c3 /examples/list.c | |
| parent | b818bb967c6050d14a9c7058f02592a4ffeef9b4 (diff) | |
| download | STC-modified-5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48.tar.gz STC-modified-5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48.zip | |
Renamed crandom.h to crand.h + Changed API. Renamed coptget.h to copt.h.
Diffstat (limited to 'examples/list.c')
| -rw-r--r-- | examples/list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/list.c b/examples/list.c index 352965b2..2689d187 100644 --- a/examples/list.c +++ b/examples/list.c @@ -1,15 +1,15 @@ #include <stdio.h>
#include <time.h>
#include <stc/clist.h>
-#include <stc/crandom.h>
+#include <stc/crand.h>
declare_clist(ix, uint64_t);
int main() {
clist_ix list = clist_init;
- crandom32_t pcg = crandom32_uniform_engine(time(NULL));
+ crand_eng32_t pcg = crand_eng32(time(NULL));
int n;
for (int i=0; i<10000000; ++i) // ten million
- clist_ix_push_back(&list, crandom32_uniform_int(&pcg));
+ clist_ix_push_back(&list, crand_gen_i32(&pcg));
n = 100;
c_foreach (i, clist_ix, list)
if (n--) printf("%8d: %10zu\n", 100 - n, i.item->value); else break;
|
