blob: e777069692d3e335de4b6996bac0ea8803afb045 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <stdbool.h>
#include "util.h"
#include "km.h"
// fill buffer with N random floats
bool
km_rand_get_floats(
km_rand_t * const rs,
const size_t num_floats,
float * const floats
) {
return rs->cbs->get_floats(rs, num_floats, floats);
}
// fill buffer with N random size_ts
bool
km_rand_get_sizes(
km_rand_t * const rs,
const size_t num_sizes,
size_t * const sizes
) {
return rs->cbs->get_sizes(rs, num_sizes, sizes);
}
// finalize random source
void
km_rand_fini(
km_rand_t * const rs
) {
if (rs->cbs->fini) {
rs->cbs->fini(rs);
}
}
|