Benchmark initalization problem

94 views
Skip to first unread message

jonny david

unread,
Jun 11, 2013, 5:00:15 PM6/11/13
to faceboo...@googlegroups.com
hey, i compiled the test HistogramBenchmark.cpp and ran it. It turned out that there is actually no test cases running. After some investigation, I think it might be because the static variable benchmarks is initialized in a wrong order. Basically, HistogramBenchmark.cpp first initialized it and then Benchmark.cpp initialized it (which called the constructor of vector and overwrite the initialization from HistogramBenchmark.cpp). Seems that  initialization order of static/global variables is not guaranteed by compiler. Any idea how to fix it?

I am using gcc 4.8 on ubuntu system. 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages