ChaiBapchya commented on a change in pull request #12749: [MXNET-1029] Feature
request: randint operator
URL: https://github.com/apache/incubator-mxnet/pull/12749#discussion_r406923090
##########
File path: include/mxnet/random_generator.h
##########
@@ -63,6 +63,10 @@ class RandGenerator<cpu, DType> {
MSHADOW_XINLINE int rand() { return engine_->operator()(); }
+ MSHADOW_XINLINE int64_t rand_int64() {
+ return static_cast<int64_t>(engine_->operator()() << 31) +
engine_->operator()();
Review comment:
@leezu over here I use rand_int64() by using mt19937.rand() for 2 32bits
According to the video :
https://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful
is this a right way of doing it truly uniform random integer distribution?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services