21 #include <BS_thread_pool.hpp>
23 #include <kvikio/nvtx.hpp>
27 template <
typename pool_type>
44 void reset(
unsigned int nthreads) { pool_type::reset(nthreads, worker_thread_init_func); }
47 inline static std::function<void()> worker_thread_init_func{[] {
55 using BS_thread_pool = thread_pool_wrapper<BS::thread_pool>;
static void rename_current_thread(std::string_view new_name) noexcept
在 KvikIO NVTX 域下重命名当前线程。
static const nvtx_color_type & default_color() noexcept
返回默认颜色。
thread_pool_wrapper(unsigned int nthreads)
构造一个新的线程池包装器,并在每个工作线程中调用一个预定义初始化函数...。
void reset(unsigned int nthreads)
重置线程池中的线程数,并在每个工作线程中调用一个预定义初始化函数...。