Repositories
/
ecl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e3423b
)
random-state: use byte32 array for internal representation
author
Daniel Kochmański
<daniel@turtleware.eu>
Mon, 21 Sep 2015 15:09:39 +0000
(17:09 +0200)
committer
Daniel Kochmański
<daniel@turtleware.eu>
Mon, 21 Sep 2015 15:09:39 +0000
(17:09 +0200)
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
src/c/num_rand.d
patch
|
blob
|
blame
|
history
diff --git
a/src/c/num_rand.d
b/src/c/num_rand.d
index
9c53cac
..
cc48ca6
100644
(file)
--- a/
src/c/num_rand.d
+++ b/
src/c/num_rand.d
@@
-3,7
+3,7
@@
/*
num_rand.c -- Random numbers.
-*/
+
n
*/
/*
Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya.
Copyright (c) 1990, Giuseppe Attardi.
@@
-49,7
+49,9
@@
cl_object
init_genrand(ulong seed)
{
cl_object array =
- ecl_alloc_simple_base_string((sizeof(ulong) * (MT_N + 1)));
+ ecl_alloc_simple_vector
+ ((MT_N + 1),
+ ecl_symbol_to_elttype(@'ext::byte32'));
ulong *mt = (ulong*)(array->base_string.self);
int j = 0;
mt[0] = seed & 0xffffffffUL;