Rename [get|set|m]_no_block to [get|set|m]_disable_blocking_kernel in public APIs

This commit is contained in:
Paul Große-Bley
2022-04-26 13:40:46 +02:00
parent 7f51ead595
commit 2b5662ea4a
6 changed files with 12 additions and 12 deletions

View File

@@ -195,10 +195,10 @@ struct benchmark_base
/// If true, the benchmark does not use the blocking_kernel. This is intended
/// for use with external profiling tools. @{
[[nodiscard]] bool get_no_block() const { return m_no_block; }
benchmark_base &set_no_block(bool v)
[[nodiscard]] bool get_disable_blocking_kernel() const { return m_disable_blocking_kernel; }
benchmark_base &set_disable_blocking_kernel(bool v)
{
m_no_block = v;
m_disable_blocking_kernel = v;
return *this;
}
/// @}
@@ -266,7 +266,7 @@ protected:
optional_ref<nvbench::printer_base> m_printer;
bool m_run_once{false};
bool m_no_block{false};
bool m_disable_blocking_kernel{false};
nvbench::int64_t m_min_samples{10};
nvbench::float64_t m_min_time{0.5};

View File

@@ -41,7 +41,7 @@ measure_cold_base::measure_cold_base(state &exec_state)
: m_state{exec_state}
, m_launch{m_state.get_cuda_stream()}
, m_run_once{exec_state.get_run_once()}
, m_no_block{exec_state.get_no_block()}
, m_no_block{exec_state.get_disable_blocking_kernel()}
, m_min_samples{exec_state.get_min_samples()}
, m_max_noise{exec_state.get_max_noise()}
, m_min_time{exec_state.get_min_time()}

View File

@@ -64,7 +64,7 @@ void state::exec(ExecTags tags, KernelLauncher &&kernel_launcher)
return;
}
if (!(modifier_tags & no_block) && this->get_no_block())
if (!(modifier_tags & no_block) && this->get_disable_blocking_kernel())
{
constexpr auto no_block_tags = modifier_tags | no_block;
this->exec(no_block_tags, std::forward<KernelLauncher>(kernel_launcher));

View File

@@ -731,7 +731,7 @@ void option_parser::disable_blocking_kernel()
}
benchmark_base &bench = *m_benchmarks.back();
bench.set_no_block(true);
bench.set_disable_blocking_kernel(true);
}
void option_parser::add_benchmark(const std::string &name)

View File

@@ -169,8 +169,8 @@ struct state
/// If true, the benchmark does not use the blocking_kernel. This is intended
/// for use with external profiling tools. @{
[[nodiscard]] bool get_no_block() const { return m_no_block; }
void set_no_block(bool v) { m_no_block = v; }
[[nodiscard]] bool get_disable_blocking_kernel() const { return m_disable_blocking_kernel; }
void set_disable_blocking_kernel(bool v) { m_disable_blocking_kernel = v; }
/// @}
/// Accumulate at least this many seconds of timing data per measurement. @{
@@ -328,7 +328,7 @@ private:
std::size_t m_type_config_index{};
bool m_run_once{false};
bool m_no_block{false};
bool m_disable_blocking_kernel{false};
nvbench::int64_t m_min_samples;
nvbench::float64_t m_min_time;

View File

@@ -35,7 +35,7 @@ namespace nvbench
state::state(const benchmark_base &bench)
: m_benchmark{bench}
, m_run_once{bench.get_run_once()}
, m_no_block{bench.get_no_block()}
, m_disable_blocking_kernel{bench.get_disable_blocking_kernel()}
, m_min_samples{bench.get_min_samples()}
, m_min_time{bench.get_min_time()}
, m_max_noise{bench.get_max_noise()}
@@ -52,7 +52,7 @@ state::state(const benchmark_base &bench,
, m_device{std::move(device)}
, m_type_config_index{type_config_index}
, m_run_once{bench.get_run_once()}
, m_no_block{bench.get_no_block()}
, m_disable_blocking_kernel{bench.get_disable_blocking_kernel()}
, m_min_samples{bench.get_min_samples()}
, m_min_time{bench.get_min_time()}
, m_max_noise{bench.get_max_noise()}