summaryrefslogtreecommitdiff
path: root/src/caffe/util/math_functions.cpp
diff options
context:
space:
mode:
authorJeff Donahue <jeff.donahue@gmail.com>2014-04-22 12:41:02 -0700
committerJeff Donahue <jeff.donahue@gmail.com>2014-04-22 23:40:18 -0700
commit99e10ea2fe93e439147e710695bffb45a30d2102 (patch)
treea5cc617c99a59a52115e156cb2623f83777c4b6e /src/caffe/util/math_functions.cpp
parentd278de29b6b14902c94a39761df9f017eecfc56b (diff)
downloadcaffeonacl-99e10ea2fe93e439147e710695bffb45a30d2102.tar.gz
caffeonacl-99e10ea2fe93e439147e710695bffb45a30d2102.tar.bz2
caffeonacl-99e10ea2fe93e439147e710695bffb45a30d2102.zip
cleanup data_layer, add prefetch_rng_ field to it and use instead of
rand -- seeded tests still fail
Diffstat (limited to 'src/caffe/util/math_functions.cpp')
-rw-r--r--src/caffe/util/math_functions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/caffe/util/math_functions.cpp b/src/caffe/util/math_functions.cpp
index a3f10843..ba2492aa 100644
--- a/src/caffe/util/math_functions.cpp
+++ b/src/caffe/util/math_functions.cpp
@@ -302,6 +302,10 @@ void caffe_exp<double>(const int n, const double* a, double* y) {
vdExp(n, a, y);
}
+unsigned int caffe_rng_rand() {
+ return (*caffe_rng())();
+}
+
template <typename Dtype>
Dtype caffe_nextafter(const Dtype b) {
return boost::math::nextafter<Dtype>(