mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Inline some methods used in benchmark loops.
This commit is contained in:
@@ -39,10 +39,4 @@ void blocking_kernel::block(const nvbench::cuda_stream &stream)
|
||||
block_stream<<<1, 1, 0, stream>>>(m_device_flag);
|
||||
}
|
||||
|
||||
void blocking_kernel::unblock()
|
||||
{
|
||||
volatile int& flag = m_host_flag;
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
} // namespace nvbench
|
||||
|
||||
@@ -58,7 +58,12 @@ struct blocking_kernel
|
||||
~blocking_kernel();
|
||||
|
||||
void block(const nvbench::cuda_stream &stream);
|
||||
void unblock();
|
||||
|
||||
__forceinline__ void unblock()
|
||||
{
|
||||
volatile int& flag = m_host_flag;
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
// move-only
|
||||
blocking_kernel(const blocking_kernel &) = delete;
|
||||
|
||||
Reference in New Issue
Block a user