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
Rename the current thread under the KvikIO NVTX domain.
static const nvtx_color_type & default_color() noexcept
Return the default color.
thread_pool_wrapper(unsigned int nthreads)
Construct a new thread pool wrapper, and invoke a pre-defined initialization function in each worker ...
void reset(unsigned int nthreads)
Reset the number of threads in the thread pool, and invoke a pre-defined initialization function in e...