mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
committed by
GitHub
parent
d8dced8a64
commit
42d99a5753
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user