summaryrefslogtreecommitdiffhomepage
path: root/examples/list.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-08-29 22:46:05 +0200
committerTyge Løvset <[email protected]>2020-08-29 22:46:05 +0200
commit8efecc5d6b8d4dcd6a7bdf9540a11355b4631782 (patch)
tree701373837cfce4bd8dd0115a76517656a79c9c32 /examples/list.c
parent47de9987a623e8374915af40d67d72dcb56e4283 (diff)
downloadSTC-modified-8efecc5d6b8d4dcd6a7bdf9540a11355b4631782.tar.gz
STC-modified-8efecc5d6b8d4dcd6a7bdf9540a11355b4631782.zip
Updated crandom.h API! update to benchmark.c . Optimized cmap iter.
Diffstat (limited to 'examples/list.c')
-rw-r--r--examples/list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/list.c b/examples/list.c
index 3018a1f1..c9ec4a16 100644
--- a/examples/list.c
+++ b/examples/list.c
@@ -7,11 +7,11 @@ declare_clist(fx, double);
int main() {
int k, n = 100000;
clist_fx list = clist_init;
- crandom_eng64_t eng = crandom_eng64_init(time(NULL));
- crandom_distrib_f64_t dist = crandom_uniform_f64_init(0.0f, n);
+ crand_rng64_t eng = crand_rng64_init(time(NULL));
+ crand_uniform_f64_t dist = crand_uniform_f64_init(eng, 0.0f, n);
for (int i = 0; i < 100000; ++i)
- clist_fx_push_back(&list, crandom_uniform_f64(&eng, dist));
+ clist_fx_push_back(&list, crand_uniform_f64(&dist));
k = 0; c_foreach (i, clist_fx, list)
if (++k <= 10) printf("%8d: %10f\n", k, i.item->value); else break;