Skip to content

Commit

Permalink
Adding explicit double to long double conversions for the default case
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant <[email protected]>
  • Loading branch information
vrnimje committed Apr 22, 2024
1 parent 2e70beb commit 2f60c37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/core/testing/src/performance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ average: {{average(elapsed)}}{{^-last}}

public:
HPX_CORE_EXPORT void add(std::string const& name,
std::string const& executor, double time);
std::string const& executor, long double time);
};

json_perf_times& times()
Expand Down Expand Up @@ -157,7 +157,7 @@ average: {{average(elapsed)}}{{^-last}}
strm << "Results:\n\n";
for (auto&& item : obj.m_map)
{
long double average = 0.0;
long double average = static_cast<long double>(0.0);
int series = 0;
strm << "name: " << std::get<0>(item.first) << "\n";
strm << "executor: " << std::get<1>(item.first) << "\n";
Expand All @@ -175,8 +175,8 @@ average: {{average(elapsed)}}{{^-last}}
return strm;
}

void json_perf_times::add(
std::string const& name, std::string const& executor, double time)
void json_perf_times::add(std::string const& name,
std::string const& executor, long double time)
{
m_map[key_t(name, executor)].push_back(time);
}
Expand Down Expand Up @@ -234,7 +234,7 @@ average: {{average(elapsed)}}{{^-last}}
// First iteration to cache the data
test();
using timer = std::chrono::high_resolution_clock;
for (size_t i = 0; i != steps; ++i)
for (std::size_t i = 0; i != steps; ++i)
{
// For now we don't flush the cache
//flush_cache();
Expand Down

0 comments on commit 2f60c37

Please sign in to comment.