MCPcopy Create free account
hub / github.com/TheHPXProject/hpx / null_function

Function null_function

tests/performance/local/future_overhead.cpp:97–114  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

95
96///////////////////////////////////////////////////////////////////////////////
97double null_function() noexcept
98{
99 if (num_iterations > 0)
100 {
101 constexpr int array_size = 4096;
102 std::array<double, array_size> dummy;
103 for (std::uint64_t i = 0; i < num_iterations; ++i)
104 {
105 for (std::uint64_t j = 0; j < array_size; ++j)
106 {
107 dummy[j] = 1.0 / (2.0 * i * j + 1.0);
108 }
109 }
110 global_scratch = dummy[0];
111 return dummy[0];
112 }
113 return 0.0;
114}
115
116struct scratcher
117{

Calls

no outgoing calls

Tested by

no test coverage detected