Inline some methods used in benchmark loops.

This commit is contained in:
Allison Vacanti
2021-02-17 18:34:09 -05:00
parent f61be70a93
commit 8a1f017a4e
2 changed files with 6 additions and 7 deletions

View File

@@ -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

View File

@@ -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;