Hide boost rng behind facade for osx compatibility
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Sat, 22 Mar 2014 06:47:01 +0000 (23:47 -0700)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Sat, 22 Mar 2014 19:08:26 +0000 (12:08 -0700)
commit19bcf2b29bf9e48ff84d18763c6d2b5f41e5bdcd
treef01b1ac136d60883ec62982fdd86a9ac3e6ffe37
parentaaa26466eb74f94f5d403cf3cc2b5fb6e0a17a06
Hide boost rng behind facade for osx compatibility

Split boost random number generation from the common Caffe singleton and
add a helper function for rng. This resolves a build conflict in OSX
between boost rng and nvcc compilation of cuda code.

Refer to #165 for a full discussion.

Thanks to @satol for suggesting a random number generation facade rather
than a total split of cpp and cu code, which is far more involved.
include/caffe/common.hpp
include/caffe/util/rng.hpp [new file with mode: 0644]
src/caffe/common.cpp
src/caffe/util/math_functions.cpp