File tree Expand file tree Collapse file tree
benchmark/src/libfork_benchmark/fib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ void fib_recursive_deque(benchmark::State &state) {
139139
140140 state.counters [" n" ] = static_cast <double >(n);
141141
142- lf::deque<std::int64_t > deque;
142+ lf::deque<std::int64_t > deque{ 64 } ;
143143 tls_deque = &deque;
144144
145145 for (auto _ : state) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ struct deque_ctx {
7878
7979 using handle_type = lf::frame_handle<deque_ctx>;
8080
81- lf::deque<handle_type> work;
81+ lf::deque<handle_type> work{ 64 } ;
8282 Alloc my_allocator;
8383
8484 auto allocator () noexcept -> Alloc & { return my_allocator; }
@@ -121,7 +121,7 @@ struct poly_deque_ctx final : lf::basic_poly_context<Alloc> {
121121
122122 using handle_type = lf::frame_handle<lf::basic_poly_context<Alloc>>;
123123
124- lf::deque<handle_type> work;
124+ lf::deque<handle_type> work{ 64 } ;
125125
126126 void post (lf::await_handle<lf::basic_poly_context<Alloc>>) override {}
127127
Original file line number Diff line number Diff line change @@ -10,7 +10,15 @@ constexpr std::size_t k_megabyte = 1024 * k_kilobyte;
1010constexpr std::uint32_t k_u16_max = std::numeric_limits<std::uint16_t >::max();
1111
1212export constexpr std::size_t k_new_align = __STDCPP_DEFAULT_NEW_ALIGNMENT__;
13- export constexpr std::size_t k_cache_line = std::hardware_destructive_interference_size;
1413export constexpr std::size_t k_page_size = 4096 ; // 4 KiB on most systems.
1514
15+ #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
16+ #pragma GCC diagnostic push
17+ #pragma GCC diagnostic ignored "-Winterference-size"
18+ #endif // #ifdef __GNUC__
19+ export constexpr std::size_t k_cache_line = std::hardware_destructive_interference_size;
20+ #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
21+ #pragma GCC diagnostic pop
22+ #endif // #ifdef __GNUC__
23+
1624} // namespace lf
You can’t perform that action at this time.
0 commit comments