17 #ifndef ONEAPI_DNNL_DNNL_THREADPOOL_IFACE_HPP 18 #define ONEAPI_DNNL_DNNL_THREADPOOL_IFACE_HPP 33 namespace threadpool_interop {
49 virtual void parallel_for(
int n,
const std::function<
void(
int,
int)> &fn)
oneDNN namespace
Definition: dnnl.hpp:74
virtual void parallel_for(int n, const std::function< void(int, int)> &fn)=0
Submits n instances of a closure for execution in parallel:
virtual bool get_in_parallel() const =0
Returns true if the calling thread belongs to this threadpool.
virtual int get_num_threads() const =0
Returns the number of worker threads.
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:57
Abstract threadpool interface.
Definition: dnnl_threadpool_iface.hpp:38
virtual uint64_t get_flags() const =0
Returns threadpool behavior flags bit mask (see below).