NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
random.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
random.hpp
"
27
#include <boost/thread/tss.hpp>
28
29
namespace
nfd
{
30
31
std::mt19937&
32
getGlobalRng
()
33
{
34
static
boost::thread_specific_ptr<std::mt19937> rng;
35
if
(rng.get() ==
nullptr
) {
36
std::random_device rd;
37
rng.reset(
new
std::mt19937(rd()));
38
}
39
return
*rng;
40
}
41
42
}
// namespace nfd
random.hpp
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::getGlobalRng
std::mt19937 & getGlobalRng()
Definition:
random.cpp:32
ndnSIM
NFD
core
random.cpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13