Skip to content

Commit 0573ffa

Browse files
authored
Merge pull request #214 from PointKernel/fix-throttle-setters
Fix throttle setter return values and update customization example
2 parents 2938a94 + dbd12f6 commit 0573ffa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nvbench/benchmark_base.cuh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,21 @@ struct benchmark_base
249249

250250
[[nodiscard]] nvbench::float32_t get_throttle_threshold() const { return m_throttle_threshold; }
251251

252-
void set_throttle_threshold(nvbench::float32_t throttle_threshold)
252+
benchmark_base &set_throttle_threshold(nvbench::float32_t throttle_threshold)
253253
{
254254
m_throttle_threshold = throttle_threshold;
255+
return *this;
255256
}
256257

257258
[[nodiscard]] nvbench::float32_t get_throttle_recovery_delay() const
258259
{
259260
return m_throttle_recovery_delay;
260261
}
261262

262-
void set_throttle_recovery_delay(nvbench::float32_t throttle_recovery_delay)
263+
benchmark_base &set_throttle_recovery_delay(nvbench::float32_t throttle_recovery_delay)
263264
{
264265
m_throttle_recovery_delay = throttle_recovery_delay;
266+
return *this;
265267
}
266268

267269
[[nodiscard]] nvbench::criterion_params &get_criterion_params() { return m_criterion_params; }

0 commit comments

Comments
 (0)