]> www.ginac.de Git - cln.git/blob - src/base/random/cl_random_def.cc
Replace CL_REQUIRE/CL_PROVIDE(cl_random_def) with portable code.
[cln.git] / src / base / random / cl_random_def.cc
1 // default_random_state.
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/random.h"
8
9
10 // Implementation.
11
12 namespace cln {
13         
14 random_state default_random_state;
15
16 int cl_random_def_init_helper::count = 0;
17 cl_random_def_init_helper::cl_random_def_init_helper()
18 {
19         if (count++ == 0) {
20                 default_random_state = random_state();
21         }
22 }
23
24 cl_random_def_init_helper::~cl_random_def_init_helper()
25 {
26         if (--count == 0) {
27                 // Nothing to clean up?
28         }
29 }
30
31 }  // namespace cln
32