/* compile the example program with the following command line: g++ -O3 rngthreadexample.cpp rng_paraqueue_pool.cpp rng_queue_pool.cpp rngqueue.cpp -o rngthreadex -lgsl -lgslcblas -I/usr/include/qt4/QtCore -I/usr/include/qt4 -lQtCore -lpthread */ #include #include "rng_queue_pool.hpp" #include "rng_paraqueue_pool.hpp" using namespace std; int main() { const int NLoops=1000; const double PoissonLambda=0.3; int NRngVectors=6; int NRNumbersPerVector=500; IRngQueue* rnq = RngParaQueuePool::getRngQueuePool() ->getRngQueue(kRngPoisson, PoissonLambda, NRngVectors, NRNumbersPerVector); const int NumsPerLine=35; cout << "Random numbers:\n"; for (int i=0; igetRandomNumber(); cout << RandomNum << " "; } cout << "\n"; return 0; }