Skip to content

Commit

Permalink
Cleanup filesystem header handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Apr 5, 2024
1 parent de3d202 commit 21742e6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions nvbench/json_printer.cu
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@
#include <utility>
#include <vector>

#if defined __GNUC__ && !defined __clang__
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#elif __has_include(<experimental/filesystem>)
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#include <filesystem>
static_assert(false, "No <filesystem> or <experimental/filesystem> found.");
#endif

#if NVBENCH_CPP_DIALECT >= 2020
Expand Down Expand Up @@ -140,12 +144,6 @@ void json_printer::do_process_bulk_data_float64(state &state,

if (hint == "sample_times")
{
#if defined __GNUC__ && !defined __clang__
namespace fs = std::experimental::filesystem;
#else
namespace fs = std::filesystem;
#endif

nvbench::cpu_timer timer;
timer.start();

Expand Down

0 comments on commit 21742e6

Please sign in to comment.