Skip to content

Commit

Permalink
fix MSVC breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
damageboy committed Sep 11, 2023
1 parent 3f165ab commit 5036e03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bench/fullsort/BM_fullsort.vxsort.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define VXSORT_BM_FULLSORT_VXSORT_H

#include <benchmark/benchmark.h>
#include <cxxabi.h>
#include <fmt/format.h>
#include <algorithm>
#include <magic_enum.hpp>
Expand All @@ -11,6 +10,10 @@
#include "../bench_isa.h"
#include "../util.h"

#ifndef VXSORT_COMPILER_MSVC
#include <cxxabi.h>
#endif

#include <vxsort.h>

#include "fullsort_params.h"
Expand Down Expand Up @@ -184,7 +187,11 @@ void register_type(i64 s, SortPattern p) {
if constexpr (U >= 2) {
register_type<M, U / 2, T>(s, p);
}
#ifdef VXSORT_COMPILER_MSVC
auto realname = typeid(T).name();
#else
auto realname = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, nullptr);
#endif
auto bench_name = fmt::format("BM_vxsort_pattern<{}, {}, {}>/{}/{}", realname, U, s,
magic_enum::enum_name(M), magic_enum::enum_name(p));
::benchmark::RegisterBenchmark(bench_name.c_str(), BM_vxsort_pattern<T, M, U>, s, p)
Expand Down

0 comments on commit 5036e03

Please sign in to comment.