[arrayfire] 139/408: BUGFIX: Fixing setSeed for randu

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 05509c9399b6ae02d6a54d57b6c1feb564be8269
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Mon Jul 13 13:56:55 2015 -0400

    BUGFIX: Fixing setSeed for randu
---
 src/backend/cpu/random.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/backend/cpu/random.cpp b/src/backend/cpu/random.cpp
index 71de4ef..4c91b96 100644
--- a/src/backend/cpu/random.cpp
+++ b/src/backend/cpu/random.cpp
@@ -110,6 +110,7 @@ Array<T> randu(const af::dim4 &dims)
 
     if (my_seed != gen_seed) {
         gen = urand<T>(generator);
+        my_seed = gen_seed;
     }
 
     Array<T> outArray = createEmptyArray<T>(dims);
@@ -155,6 +156,7 @@ Array<char> randu(const af::dim4 &dims)
 
     if (my_seed != gen_seed) {
         gen = urand<float>(generator);
+        my_seed = gen_seed;
     }
 
     Array<char> outArray = createEmptyArray<char>(dims);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list