PUPable Random Number Engines12/4612/4
commit12d60578bce58424773b8e0562089ce8bca03361
authorNischay Singh <bajwa.nischay@gmail.com>
Mon, 24 Sep 2018 21:06:15 +0000 (24 16:06 -0500)
committerEvan Ramos <evan@hpccharm.com>
Thu, 20 Dec 2018 01:30:09 +0000 (19 19:30 -0600)
treee697d5bb50a2a298c3048c37c081d2b021ad3d85
parent5f89dc7ae427dca829b520c3a76a5aa4f64c146d
PUPable Random Number Engines

C++ 11 provides random number engines and
engine adaptors that are widely used
(presumably in Charm Applications).

This commit adds functionality to PUP
these engines and engine adaptors so that
the user canpreserve the state of these
engines and engine adaptors during the
migration of chares.

The commit makes the following six engines
and engine adaptors in Charm++:

Engines
-linear_congruential_engine(C++11)
-mersenne_twister_engine(C++11)
-subtract_with_carry_engine(C++11)
Engine Adaptors
-discard_block_engine(C++11)
-independent_bits_engine(C++11)
-shuffle_order_engine(C++11)

Read more about these on
https://en.cppreference.com/w/cpp/header/random

Algorithm:
While packing an engine, we extract the
state of the engine (String) and PUP it.
While unpacking, we create a new engine
and feed it the unpacked state (String).

Change-Id: I5a670c92f579ef0a1b807266a2c55dbbe30fc7be
src/util/pup_stl.h