@@ -24,7 +24,7 @@ const u64 N = (1ull << 25); // data size
2424#else
2525 double *data;
2626#endif
27- u64 get_cycle ()
27+ static u64 get_cycle ()
2828{
2929#ifdef __amd64__
3030 uint64_t low, high;
@@ -34,13 +34,13 @@ u64 get_cycle()
3434 return 0 ;
3535#endif
3636}
37- auto getns ()
37+ static auto getns ()
3838{
3939 auto now = std::chrono::high_resolution_clock::now ();
4040 auto nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch ()).count ();
4141 return nanos;
4242}
43- double gen_double_filter_NaN_Inf ()
43+ static double gen_double_filter_NaN_Inf ()
4444{
4545 unsigned long long rnd,rnd_abs;
4646 do {
@@ -50,7 +50,7 @@ double gen_double_filter_NaN_Inf()
5050 while (rnd_abs >= (0x7ffull << 52 )); // nan or inf
5151 return *(double *)&rnd;
5252}
53- double gen_double_filter_NaN_Inf_subnormal ()
53+ static double gen_double_filter_NaN_Inf_subnormal ()
5454{
5555 unsigned long long rnd,rnd_abs;
5656 do {
@@ -60,7 +60,7 @@ double gen_double_filter_NaN_Inf_subnormal()
6060 while (rnd_abs >= (0x7ffull << 52 ) && rnd_abs < (1ull << 52 ) ); // nan or inf or subnormal
6161 return *(double *)&rnd;
6262}
63- float gen_float_filter_NaN_Inf ()
63+ static float gen_float_filter_NaN_Inf ()
6464{
6565 unsigned int rnd,rnd_abs;
6666 do {
@@ -70,7 +70,7 @@ float gen_float_filter_NaN_Inf()
7070 while (rnd_abs >= (0xffu << 23 )); // nan or inf
7171 return *(float *)&rnd;
7272}
73- float gen_float_filter_NaN_Inf_subnormal ()
73+ static float gen_float_filter_NaN_Inf_subnormal ()
7474{
7575 unsigned int rnd,rnd_abs;
7676 do {
@@ -80,7 +80,7 @@ float gen_float_filter_NaN_Inf_subnormal()
8080 while (rnd_abs >= (0xffu << 23 ) && rnd_abs < (1u << 23 ) ); // nan or inf or subnormal
8181 return *(float *)&rnd;
8282}
83- void init_data ()
83+ static void init_data ()
8484{
8585#if PERF_DOUBLE_OR_FLOAT == FLOAT
8686 data = new float [N];
0 commit comments