NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
static
boost::thread_specific_ptr<boost::random::mt19937>
g_rng
;
32
33
boost::random::mt19937&
34
getGlobalRng
()
35
{
36
if
(g_rng.get() ==
nullptr
) {
37
g_rng.reset(
new
boost::random::mt19937());
38
}
39
return
*
g_rng
;
40
}
41
42
void
43
resetGlobalRng
()
44
{
45
g_rng.reset();
46
}
47
48
}
// namespace nfd
random.hpp
nfd::g_rng
static boost::thread_specific_ptr< boost::random::mt19937 > g_rng
Definition:
random.cpp:31
nfd::resetGlobalRng
void resetGlobalRng()
Definition:
random.cpp:43
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::getGlobalRng
boost::random::mt19937 & getGlobalRng()
Definition:
random.cpp:34
ndnSIM
NFD
core
random.cpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11