* Fix MSVC

* Revert change of source list name
This commit is contained in:
Georgii Evtushenko
2024-04-04 09:53:30 -07:00
committed by GitHub
parent d8dced8a64
commit 42d99a5753
5 changed files with 11 additions and 2 deletions

View File

@@ -33,9 +33,11 @@ endforeach()
set(thrust_examples
auto_throughput
axes
custom_criterion
exec_tag_sync
exec_tag_timer
skip
stream
throughput
)
foreach (example IN LISTS thrust_examples)

View File

@@ -133,7 +133,7 @@ void copy_type_conversion_sweep(nvbench::state &state,
nvbench::type_list<InputType, OutputType>)
{
// Optional: Skip narrowing conversions.
if (sizeof(InputType) > sizeof(OutputType))
if constexpr(sizeof(InputType) > sizeof(OutputType))
{
state.skip("Narrowing conversion: sizeof(InputType) > sizeof(OutputType).");
return;

View File

@@ -91,7 +91,7 @@ NVBENCH_BENCH(runtime_enum_sweep_string)
// ```
void runtime_enum_sweep_int64(nvbench::state &state)
{
const auto enum_value = static_cast<MyEnum>(state.get_int64("MyEnum"));
[[maybe_unused]] const auto enum_value = static_cast<MyEnum>(state.get_int64("MyEnum"));
// Do stuff with enum_value.
// Create inputs, etc, configure runtime kernel parameters, etc.

View File

@@ -26,9 +26,14 @@
#include <iterator>
#include <limits>
#include <numeric>
#include <cmath>
#include <type_traits>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
namespace nvbench::detail::statistics
{

View File

@@ -86,6 +86,8 @@ public:
, m_params{std::move(params)}
{}
virtual ~stopping_criterion_base() = default;
[[nodiscard]] const std::string &get_name() const { return m_name; }
[[nodiscard]] const criterion_params &get_params() const { return m_params; }