oneAPI Deep Neural Network Library (oneDNN)
1.95.0
Performance library for Deep Learning
17 #ifndef DNNL_THREADPOOL_IFACE_HPP
18 #define DNNL_THREADPOOL_IFACE_HPP
27 struct threadpool_iface {
38 virtual void parallel_for(
int n,
const std::function<
void(
int,
int)> &fn)
48 virtual ~threadpool_iface() {}
virtual void parallel_for(int n, const std::function< void(int, int)> &fn)=0
Submits n instances of a closure for execution in parallel:
static constexpr uint64_t ASYNCHRONOUS
If set, parallel_for() returns immediately and oneDNN needs implement waiting for the submitted closu...
Definition: dnnl_threadpool_iface.hpp:74
virtual int get_num_threads() const =0
Returns the number of worker threads.
virtual uint64_t get_flags() const =0
Returns threadpool behavior flags bit mask (see below).
oneDNN namespace
Definition: dnnl.hpp:86
virtual bool get_in_parallel() const =0
Returns true if the calling thread belongs to this threadpool.